To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 4513

Show
Ignore:
Timestamp:
01/25/12 14:33:16 (4 months ago)
Author:
tboutell
Message:

Chrome unfortunately never reports that the drag has left the window (or been given up on), only that the drag has entered the body element (it keeps reporting that while outside the window). We can cope by considering the drag out of bounds when the BODY element is returned. Note that we always have wrapper divs so this works in practice although in theory it could be troublesome

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostropheHTML5Plugin/trunk/web/fileuploader/fileuploader.js

    r4512 r4513  
    589589        qq.attach(document, 'dragleave', function(e){ 
    590590            if (!dz._isValidFileDrag(e)) return;             
    591              
    592591            var relatedTarget = document.elementFromPoint(e.clientX, e.clientY); 
    593592            // only fire when leaving document out 
    594             if ( ! relatedTarget || relatedTarget.nodeName == "HTML"){                
    595                 if (!this._options.alwaysShowDropArea) 
     593            // Chrome never sends us nodeName HTML, only nodeName BODY. This would be a problem 
     594            // if we had plain old body space but we never do that, we always have wrapper divs tom@punkave.com 
     595            if ( ! relatedTarget || relatedTarget.nodeName == "HTML" || relatedTarget.nodeName == "BODY"){                
     596                if (!self._options.alwaysShowDropArea) 
    596597                { 
    597598                  dropArea.style.display = 'none';