[CLOSED] Make enter key activate button click direct event

  1. #1

    [CLOSED] Make enter key activate button click direct event

    Is there any easy way to make an enter key pressed inside a textfield activate the click direct event of a button?
    Last edited by geoffrey.mcgill; Sep 15, 2010 at 6:10 PM. Reason: [CLOSED]
  2. #2
    Quote Originally Posted by Pablo Azevedo View Post
    Is there any easy way to make an enter key pressed inside a textfield activate the click direct event of a button?
    You would have to handle the KeyPress|KeyUp|KeyDown events of the TextField and fire the "click" event client-side.

    Maybe better to just handle the same key event and call the same DirectEvent as the Button.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    how do i fire the click event client side?
  4. #4
    Hi,

    You can call the .fireEvent() client-side function, see

    http://dev.sencha.com/deploy/dev/doc...mber=fireEvent
    Geoffrey McGill
    Founder
  5. #5
    Thanks. That did it. Solved.

Similar Threads

  1. Replies: 2
    Last Post: Apr 09, 2012, 2:13 PM
  2. Replies: 6
    Last Post: Dec 14, 2011, 5:24 AM
  3. Replies: 1
    Last Post: May 25, 2011, 5:06 PM
  4. Replies: 4
    Last Post: Nov 19, 2010, 1:39 PM
  5. Enter Key To Activate Search
    By EzaBlade in forum 1.x Help
    Replies: 2
    Last Post: Feb 09, 2009, 10:43 AM

Posting Permissions