]> source.dussan.org Git - jquery-ui.git/commitdiff
Added a namespace to the selectstart event handler in $.ui.disableSelection() so...
authorScott González <scott.gonzalez@gmail.com>
Fri, 15 Aug 2008 01:32:57 +0000 (01:32 +0000)
committerScott González <scott.gonzalez@gmail.com>
Fri, 15 Aug 2008 01:32:57 +0000 (01:32 +0000)
ui/ui.core.js

index 0277266daf19fc981215161a95f91d0681b6802a..fa9b0e91969b70a87723e9489473a78430e1bc5a 100644 (file)
@@ -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',