Tommy Skaue
2006-May-01 21:29 UTC
RE: Leak in the Autocompleter, with scrollable result-div ?
Hi Ed The reason it adds a new onblur is because when you click the scrollbar the event is gone. I dont know why and how to prevent it, but without adding it back the onblur does not get triggered and the layer does not hide when you click somewhere else on the page. If anyone finds a better solution, please provide a patch. I still have not been able to make the blur work on Safari, so Thomas wont add the patch to the SVN. I do not have Safari (nor access to it), so getting help from you Mac-people would be awesome ;-) -Tommy ---------- Forwarded message ----------> From: "Ed C." <defeated2k4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Date: Mon, 1 May 2006 17:20:13 -0400 > Subject: [Rails-spinoffs] RE: Leak in the Autocompleter, with scrollable > result-div ? > Tommy, > > Every time the Autocomplete results is blur()''d, it adds another onblur > event observer (because of "Event.observe(this.update, "blur", > this.onBlur.bindAsEventListener(this),true); // make sure blur is still > around on") which leads to a performance problem / memory leak. > > (Commenting it out seems to fix this problem.) > > I was wondering why it was there? > > Thanks again, > Ed C. > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs