Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] DataTable.destroy() not cleaning up all listeners

Expand Messages
  • Eric Miraglia
    Bryce, Actually, scratch that -- we ve got this logged already and are working on having it fixed for 2.5.0 if possible. Regards, Eric
    Message 1 of 3 , Feb 4, 2008
    • 0 Attachment
      Bryce,

      Actually, scratch that -- we've got this logged already and are working on having it fixed for 2.5.0 if possible.

      Regards,
      Eric


      ______________________________________________
      Eric Miraglia
      Yahoo! User Interface Library



      On Feb 4, 2008, at 7:54 AM, Eric Miraglia wrote:

      Bryce,

      The best way to get this information into Jenny and Luke's queue is by filing it as a bug in SourceForge (if you haven't already):


      Regards,
      Eric



      ______________________________________________
      Eric Miraglia
      Yahoo! User Interface Library



      On Jan 31, 2008, at 3:26 PM, Bryce Kujala wrote:

      When I call destroy() on a data table, it leaves behind two listeners
      that are being applied to the document, _onDocumentClick and
      _onDocumentKeydown. In my use case, I'm loading pages via AJAX, so I
      want all traces of the data table to be wiped out when I move on to a
      new page. I can do this manually in my cleanup code, but this seems
      like something that I should get for free with the destroy() method.

      This is something I noticed because of another bug that seems to
      exist. When I called .click() on an element to activate the click
      handlers on that button, I noticed that I got an error for every data
      table that had been created during that session because in the event
      that gets passed into _onDocumentClick, there is no tagName, so I get
      an error on the second line on the function:

      YAHOO.widget. DataTable. prototype. _onDocumentClick = function(e, oSelf) {
      var elTarget = YAHOO.util.Event. getTarget( e);
      var elTag = elTarget.tagName. toLowerCase( );

      Shouldn't it check that tageName exists before calling toLowerCase on it?

      Thanks,
      Bryce



    Your message has been successfully submitted and would be delivered to recipients shortly.