Skip to content
Permalink
Browse files

Avoid IE memory leak on enableSelection, disableSelection methods.

  • Loading branch information
eduardolundgren committed Jun 27, 2008
1 parent b4178f6 commit f42d42b61fd00269d9fdefde83ed69f0f8bd7489
Showing with 4 additions and 8 deletions.
  1. +4 −8 ui/ui.core.js
@@ -46,15 +46,11 @@ $.ui = {
try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){}
return $.ui.cssCache[name];
},
disableSelection: function(e) {
e.unselectable = "on";
e.onselectstart = function() { return false; };
if (e.style) { e.style.MozUserSelect = "none"; }
disableSelection: function(el) {
$(el).attr('unselectable', 'on').css('MozUserSelect', 'none');
},
enableSelection: function(e) {
e.unselectable = "off";
e.onselectstart = function() { return true; };
if (e.style) { e.style.MozUserSelect = ""; }
enableSelection: function(el) {
$(el).attr('unselectable', 'off').css('MozUserSelect', '');
},
hasScroll: function(e, a) {
var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false;

0 comments on commit f42d42b

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