Ignore:
Timestamp:
Oct 28, 2011, 3:25:54 PM (12 years ago)
Author:
patdenice
Message:

feature:2487
Update jQuery to 1.6.4 and jQuery UI to 1.8.16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/js/ui/jquery.ui.droppable.js

    r9559 r12525  
    11/*
    2  * jQuery UI Droppable 1.8.10
     2 * jQuery UI Droppable 1.8.16
    33 *
    44 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
     
    148148
    149149$.extend($.ui.droppable, {
    150         version: "1.8.10"
     150        version: "1.8.16"
    151151});
    152152
     
    213213                        m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue;                                                                       //If the element is not visible, continue
    214214
     215                        if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
     216
    215217                        m[i].offset = m[i].element.offset();
    216218                        m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
    217 
    218                         if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
    219219
    220220                }
     
    238238                return dropped;
    239239
     240        },
     241        dragStart: function( draggable, event ) {
     242                //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
     243                draggable.element.parents( ":not(body,html)" ).bind( "scroll.droppable", function() {
     244                        if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
     245                });
    240246        },
    241247        drag: function(draggable, event) {
     
    280286                });
    281287
     288        },
     289        dragStop: function( draggable, event ) {
     290                draggable.element.parents( ":not(body,html)" ).unbind( "scroll.droppable" );
     291                //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
     292                if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
    282293        }
    283294};
Note: See TracChangeset for help on using the changeset viewer.