Added a namespace to the selectstart event handler in $.ui.disableSelection() so we don't remove other event handlers in $.ui.disableSelection().

This commit is contained in:
Scott González 2008-08-15 01:32:57 +00:00
parent 4055921531
commit d9bb9eb1df

View 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',