Results 1 to 6 of 6

Thread: ST2.3.0:Formpanel submit/beforesubmit event not firing on pressing Go(iOS)/Enter(And)

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    73

    Default ST2.3.0:Formpanel submit/beforesubmit event not firing on pressing Go(iOS)/Enter(And)

    Inside a panel, I have a formpanel in which I have a fieldset and a numberfield inside the fieldset. Now when the user presses the Go button (on iOS) the form gets submitted. I tried this on my Chrome browser on my PC and the same thing happens - with the Sencha plugin and found the only event which got generated was 'action' on all of the above - formpanel, fieldset, numberfield. Now I want to do some prevalidation and stop this form submission business. So far I tried some recommendations like setting standardSubmit to false, having a beforeSubmit etc. but nothing worked - no wonder it didn't b'cos the beforesubmit or submit event itself never gets fired. So there's no way returning false from these work. Ironically these two are documented events on the Ext.form.Panel page while I didn't see the 'action' event documented here.

    Also on the Chrome browser (43.0.2357.93) on Android (5.1), after entering text in the numeric field and then pressing the enter button on the keyboard doesn't cause the submission to happen but brings down the URL dropdown to show more options. This seems to be a bug.

    My main problem however is how to trap the submit event cleanly when user presses Go (iOS)/Enter(Android). Can anyone help with a solution for this please ? Thanks.

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    73

    Default

    p.s. : I have already looked at https://www.sencha.com/forum/showthread.php?267370, but I need to use a formpanel itself.

  3. #3
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    389

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

    I do have a temporary work around for you for preventing for submission in the meantime. The beforesubmit event is firing a bit too late to stop the form submit. Try this :

    PHP Code:
    listeners: {
                    
    beforesubmit: {
                        
    fn: function() {????????????
                            
    console.log('Cancel submit ... ');????????????
                            return 
    false// Cancel submit??????????
                        
    },
                        
    priority100
                    
    }


  4. #4
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    73

    Default

    I tried adding this code in my controller :

    Code:
    beforesubmit: { fn:this.go_enter_checker, priority:100}
    OR
    Code:
    beforesubmit: { fn: function () {
                        console.log("Got into beforesubmit");
                        return false;
                     }
                    , priority: 100}
    Both return me an error 'Uncaught TypeError: firingFn.apply is not a function' in the console. I tried adding in the view also but it doesn't help me (btw am using Sencha Touch 2.4.2 now).

  5. #5
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    73

    Default

    Just to be complete the code looks like this :
    Code:
    control:  {
                'main > list': {
                    itemtap: 'mainListItemTapHandler'
                },
    
                'wizzzz > wizformpanel': {
                    //action : 'go_enter_checker'
                    
                    //beforesubmit: { function:this.go_enter_checker, priority:100}
                    beforesubmit: { fn: function () {
                        console.log("Got into beforesubmit");
                        return false;
                     }
                    , priority: 100}
                },
    ...
    Both the commented and uncommented versions give the same error (looks like some basic issue..)

  6. #6
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    73

    Default

    Also pressing the enter key in Chrome on Android opens the URL dropdown instead.

Similar Threads

  1. Replies: 0
    Last Post: 5 May 2010, 3:18 PM
  2. Submit FormPanel via Enter-Key -> fireEvent of Submit-Button
    By Realnub in forum Ext 3.x: Help & Discussion
    Replies: 10
    Last Post: 13 Jan 2010, 3:36 AM
  3. Formpanel Submit on Enter
    By dveloper in forum Sencha GXT Q&A
    Replies: 6
    Last Post: 2 Sep 2008, 5:45 AM
  4. FormPanel => Enter key doesn't submit in Firefox
    By Kutu in forum Ext GWT: Bugs (1.x)
    Replies: 4
    Last Post: 31 Aug 2008, 8:23 PM
  5. Replies: 1
    Last Post: 15 Jan 2008, 8:30 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •