Search and Top Navigation
#5798 closed bug (duplicate)
Opened July 06, 2010 07:36AM UTC
Closed August 23, 2010 06:14PM UTC
Last modified October 11, 2012 09:15PM UTC
function disableSelection not correct(don`t work in all browsers)
| Reported by: | Ganster41 | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | ui.core | Version: | 1.8.2 |
| Keywords: | disableSelection | Cc: | |
| Blocked by: | Blocking: |
Description
Functions disable/enableSelection is not correct. It don`t work in webkit and IE. Correct code is:
disableSelection : function() {
this.each(function() {
this.onselectstart = function() { return false; };
this.unselectable = "on";
jQuery(this).css('-moz-user-select', 'none');
});
},
enableSelection : function() {
this.each(function() {
this.onselectstart = function() { };
this.unselectable = "off";
jQuery(this).css('-moz-user-select', 'auto');
});
}
Currently we have this:
enableSelection: function() { return this .attr( "unselectable", "off" ) .css( "MozUserSelect", "" ); }, disableSelection: function() { return this .attr( "unselectable", "on" ) .css( "MozUserSelect", "none" ); },Need to verify where this actually doesn't work. The suggested code looks okay.