From d9bb9eb1df4d35a6bd2bf09069b9deae34e07d14 Mon Sep 17 00:00:00 2001 From: Scott González Date: Fri, 15 Aug 2008 01:32:57 +0000 Subject: Added a namespace to the selectstart event handler in $.ui.disableSelection() so we don't remove other event handlers in $.ui.disableSelection(). --- ui/ui.core.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ui/ui.core.js') 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', -- cgit v1.2.3