Skip to content
Permalink
Browse files

Added a namespace to the selectstart event handler in $.ui.disableSel…

…ection() so we don't remove other event handlers in $.ui.disableSelection().
  • Loading branch information
scottgonzalez committed Aug 15, 2008
1 parent 4055921 commit d9bb9eb1df4d35a6bd2bf09069b9deae34e07d14
Showing with 8 additions and 2 deletions.
  1. +8 −2 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',

0 comments on commit d9bb9eb

Please sign in to comment.
You can’t perform that action at this time.