Skip to content
Permalink
Browse files

dialog: shadow is hidden during drag/resize for slow performance brow…

…sers (currently IE < 7) (fixes #3966)
  • Loading branch information
Paul Bakaus
Paul Bakaus committed Jan 29, 2009
1 parent b0f7179 commit 717c5f66e8c0b8b1a27c7bb9a37608dc28fa2052
Showing with 11 additions and 3 deletions.
  1. +11 −3 ui/ui.dialog.js
@@ -306,14 +306,16 @@ $.widget("ui.dialog", {
containment: 'document',
start: function() {
(options.dragStart && options.dragStart.apply(self.element[0], arguments));
if($.browser.msie && $.browser.version < 7 && self.shadow) self.shadow.hide();
},
drag: function() {
(options.drag && options.drag.apply(self.element[0], arguments));
self._refreshShadow();
self._refreshShadow(1);
},
stop: function() {
(options.dragStop && options.dragStop.apply(self.element[0], arguments));
$.ui.dialog.overlay.resize();
if($.browser.msie && $.browser.version < 7 && self.shadow) self.shadow.show();
self._refreshShadow();
}
});
@@ -337,15 +339,17 @@ $.widget("ui.dialog", {
minHeight: options.minHeight,
start: function() {
(options.resizeStart && options.resizeStart.apply(self.element[0], arguments));
if($.browser.msie && $.browser.version < 7 && self.shadow) self.shadow.hide();
},
resize: function() {
(options.resize && options.resize.apply(self.element[0], arguments));
self._refreshShadow();
self._refreshShadow(1);
},
handles: resizeHandles,
stop: function() {
(options.resizeStop && options.resizeStop.apply(self.element[0], arguments));
$.ui.dialog.overlay.resize();
if($.browser.msie && $.browser.version < 7 && self.shadow) self.shadow.show();
self._refreshShadow();
}
})
@@ -485,7 +489,11 @@ $.widget("ui.dialog", {
return this.shadow;
},

_refreshShadow: function() {
_refreshShadow: function(dragging) {
// IE6 is simply to slow to handle the reflow in a good way, so
// resizing only happens on stop, and the shadow is hidden during drag/resize
if(dragging && $.browser.msie && $.browser.version < 7) return;

var offset = this.uiDialog.offset();
this.shadow.css({
left: offset.left,

0 comments on commit 717c5f6

Please sign in to comment.
You can’t perform that action at this time.