aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.dialog.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-02-19 02:07:05 +0000
committerScott González <scott.gonzalez@gmail.com>2009-02-19 02:07:05 +0000
commit835cbf1833fa1893cfcae10cb44b170f89ea4178 (patch)
treefc6931d78b85062421dbe294f41201e1d9b94281 /ui/ui.dialog.js
parent06a513b753f4964d79d81995a0040dd0677e103d (diff)
downloadjquery-ui-835cbf1833fa1893cfcae10cb44b170f89ea4178.tar.gz
jquery-ui-835cbf1833fa1893cfcae10cb44b170f89ea4178.zip
Dialog: Use event delegation to cancel events for modal dialogs. Fixes #2807 - dialogUI + modal mode = slow.
Diffstat (limited to 'ui/ui.dialog.js')
-rw-r--r--ui/ui.dialog.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js
index 4448f34f3..5e2da14e3 100644
--- a/ui/ui.dialog.js
+++ b/ui/ui.dialog.js
@@ -524,7 +524,7 @@ $.extend($.ui.dialog.overlay, {
// we use a setTimeout in case the overlay is created from an
// event that we're going to be cancelling (see #2804)
setTimeout(function() {
- $('a, :input').bind($.ui.dialog.overlay.events, function() {
+ $(document).bind($.ui.dialog.overlay.events, function() {
// allow use of the element if inside a dialog and
// - there are no modal dialogs
// - there are modal dialogs, but we are in front of the topmost modal
@@ -572,7 +572,7 @@ $.extend($.ui.dialog.overlay, {
this.instances.splice($.inArray(this.instances, $el), 1);
if (this.instances.length === 0) {
- $('a, :input').add([document, window]).unbind('.dialog-overlay');
+ $([document, window]).unbind('.dialog-overlay');
}
$el.remove();