Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User fancing's Avatar
    Join Date
    Aug 2007
    Posts
    25
    Vote Rating
    0
    fancing is on a distinguished road

      0  

    Default Cannot catch the "keypress" and "specialkey" event.

    Cannot catch the "keypress" and "specialkey" event.


    Hi, support team,

    i am using ExtJS version 3.2.1, i want to handle the "specialkey" event of a Field to do form submit, but i failed because the event.getKey() always return undefined like this:

    Code:
    'specialkey': function(f, e) {
        var key = e.getKey(); // here i always got undefined.
        if (e.getKey() == e.ENTER) {
          var form = field.ownerCt.getForm();
          form.submit();
        }
    },
    Note: It's the same code snippet from Ext Documentation, i used in my code.

    Also, i tried to use the "keypress" event of Ext.Element, while i got the same issue.

    Could you anyone know about this, is it a bug or my mistake?

    Thank you for reply!

  2. #2
    Sencha User
    Join Date
    Aug 2010
    Posts
    28
    Vote Rating
    0
    Ourysso is on a distinguished road

      0  

    Default


    All listeners and handlers doesn't work on Firefox =/
    Last friday the code worked... =/
    What is happening?

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    95
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    IMHO this is a much better way to submit a form on enter.

Similar Threads

  1. Replies: 3
    Last Post: 28 Oct 2009, 6:38 AM
  2. Replies: 8
    Last Post: 22 Jun 2009, 8:56 PM
  3. replace the "south" with the "new Ext.StatusBar" in "layout:'border'"
    By ealpha in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 18 May 2008, 8:28 PM
  4. [SOLVED]tabs event "active","deactive" etc... not wok
    By trowa in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 5 Jul 2007, 4:05 AM

Thread Participants: 2

Tags for this Thread