Skip to content

Commit

Permalink
Added a namespace to the selectstart event handler in $.ui.disableSel…
Browse files Browse the repository at this point in the history
…ection() so we don't remove other event handlers in $.ui.disableSelection().
  • Loading branch information
scottgonzalez committed Aug 15, 2008
1 parent 4055921 commit d9bb9eb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ui/ui.core.js
Expand Up @@ -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',
Expand Down

0 comments on commit d9bb9eb

Please sign in to comment.