Ticket #2171: containmentwindow.patch
File containmentwindow.patch, 816 bytes (added by , 14 years ago) |
---|
-
ui.draggable.ext.js
90 90 $(document).width(), 91 91 ($(document).height() || document.body.parentNode.scrollHeight) 92 92 ]; 93 } else if(o._containment == 'window' || o._containment == window) { 94 var leftAdjust = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft); 95 var topAdjust = Math.max(document.documentElement.scrollTop, document.body.scrollTop); 96 o.containment = [ 97 leftAdjust, 98 topAdjust, 99 $(window).width() + leftAdjust, 100 $(window).height() + topAdjust 101 ]; 93 102 } else { //I'm a node, so compute top/left/right/bottom 94 103 95 104 var ce = $(o._containment)[0];