diff options
author | Scott González <scott.gonzalez@gmail.com> | 2008-08-15 01:32:57 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2008-08-15 01:32:57 +0000 |
commit | d9bb9eb1df4d35a6bd2bf09069b9deae34e07d14 (patch) | |
tree | ee50becd52ed88939341668f031f8e1f5143c6c8 /ui/ui.core.js | |
parent | 405592153112bc5e761a355916bbb32aa42d72c1 (diff) | |
download | jquery-ui-d9bb9eb1df4d35a6bd2bf09069b9deae34e07d14.tar.gz jquery-ui-d9bb9eb1df4d35a6bd2bf09069b9deae34e07d14.zip |
Added a namespace to the selectstart event handler in $.ui.disableSelection() so we don't remove other event handlers in $.ui.disableSelection().
Diffstat (limited to 'ui/ui.core.js')
-rw-r--r-- | ui/ui.core.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js index 0277266da..fa9b0e919 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -164,10 +164,16 @@ $.ui = { return $.ui.cssCache[name]; }, disableSelection: function(el) { - $(el).attr('unselectable', 'on').css('MozUserSelect', 'none').bind('selectstart', function() { return false; }); + $(el) + .attr('unselectable', 'on') + .css('MozUserSelect', 'none') + .bind('selectstart.ui', function() { return false; }); }, enableSelection: function(el) { - $(el).attr('unselectable', 'off').css('MozUserSelect', '').unbind('selectstart'); + $(el) + .attr('unselectable', 'off') + .css('MozUserSelect', '') + .unbind('selectstart.ui'); }, hasScroll: function(e, a) { var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop', |