mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Avoid IE memory leak on enableSelection, disableSelection methods.
This commit is contained in:
parent
b4178f63fc
commit
f42d42b61f
@ -46,15 +46,11 @@ $.ui = {
|
|||||||
try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){}
|
try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){}
|
||||||
return $.ui.cssCache[name];
|
return $.ui.cssCache[name];
|
||||||
},
|
},
|
||||||
disableSelection: function(e) {
|
disableSelection: function(el) {
|
||||||
e.unselectable = "on";
|
$(el).attr('unselectable', 'on').css('MozUserSelect', 'none');
|
||||||
e.onselectstart = function() { return false; };
|
|
||||||
if (e.style) { e.style.MozUserSelect = "none"; }
|
|
||||||
},
|
},
|
||||||
enableSelection: function(e) {
|
enableSelection: function(el) {
|
||||||
e.unselectable = "off";
|
$(el).attr('unselectable', 'off').css('MozUserSelect', '');
|
||||||
e.onselectstart = function() { return true; };
|
|
||||||
if (e.style) { e.style.MozUserSelect = ""; }
|
|
||||||
},
|
},
|
||||||
hasScroll: function(e, a) {
|
hasScroll: function(e, a) {
|
||||||
var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false;
|
var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user