]> source.dussan.org Git - jquery-ui.git/commitdiff
enableSelection/disableSelection fixed for ie
authorEduardo Lundgren <eduardolundgren@gmail.com>
Fri, 8 Aug 2008 05:53:27 +0000 (05:53 +0000)
committerEduardo Lundgren <eduardolundgren@gmail.com>
Fri, 8 Aug 2008 05:53:27 +0000 (05:53 +0000)
ui/ui.core.js

index 2ed32184d17111aa48720a3ba69bc6d5e31c41f4..a0042f6f20bf599fb09d8851e2727da969d702e3 100644 (file)
@@ -52,10 +52,10 @@ $.ui = {
                return $.ui.cssCache[name];
        },
        disableSelection: function(el) {
-               $(el).attr('unselectable', 'on').css('MozUserSelect', 'none');
+               $(el).attr('unselectable', 'on').css('MozUserSelect', 'none').bind('selectstart', function() { return false; });
        },
        enableSelection: function(el) {
-               $(el).attr('unselectable', 'off').css('MozUserSelect', '');
+               $(el).attr('unselectable', 'off').css('MozUserSelect', '').unbind('selectstart');
        },
        hasScroll: function(e, a) {
                var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',