diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-01-29 10:57:45 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-01-29 10:57:45 +0000 |
commit | 717c5f66e8c0b8b1a27c7bb9a37608dc28fa2052 (patch) | |
tree | e198282ce13b107fa2b648071bbd573a0295d050 /ui | |
parent | b0f7179462822a0d73e4a9075b675950dd36ed17 (diff) | |
download | jquery-ui-717c5f66e8c0b8b1a27c7bb9a37608dc28fa2052.tar.gz jquery-ui-717c5f66e8c0b8b1a27c7bb9a37608dc28fa2052.zip |
dialog: shadow is hidden during drag/resize for slow performance browsers (currently IE < 7) (fixes #3966)
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.dialog.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index 756c3950e..6f078b781 100644 --- a/ui/ui.dialog.js +++ b/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, |