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

48227Re: [ydn-javascript] Diable keydown event in treeview

Expand Messages
  • Satyam
    Apr 30, 2009
    • 0 Attachment
      If atreeview is your instance of TreeView, it doesn't have any
      removeListener method at all. Subscribing to an event doesn't replace
      the previous subscription, it gets the new listener added to the list.

      YAHOO.util.Event.removeListener(atreeview.getEl(),'keydown');

      should work.

      Satyam


      nkwok escribió:
      > Hello,
      >
      > I am using release 2.7.0 and like to disable the key event in treeview like 'left' arrow key and 'Home' key.
      >
      > I tried with the following method
      >
      > atreeview.removeListener('keydown')
      >
      > and
      >
      > atreeview.subscribe('keydown', function(event) {YAHOO.util.Event.preventDefault(event);});
      >
      > They both did not work. What is the best way to disable the key event for treeview?
      >
      >
      > Thanks,
      > Norman
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.287 / Virus Database: 270.12.8/2086 - Release Date: 04/29/09 06:37:00
      >
      >
    • Show all 3 messages in this topic