lundi 8 décembre 2014

[CLOSED] Cannot close window when form field has config msgTarget:'under' and allowBlank:false



  1. Looks like we can't reproduce the issue or there's a problem in the test case provided.







  2. Default Cannot close window when form field has config msgTarget:'under' and allowBlank:false



    Cannot close window when form field has config msgTarget:'under' and allowBlank:false





    Issue: Cannot close window on the first click when form field has config msgTarget:'under' and allowBlank:false

    Scenario:



    1. Window has a Form

    2. Form has a textfield

    3. Text field has the following config:

      1. allowBlank: false

      2. msgTarget: 'under'



    4. Window has a button which closes the window

    5. Now when I click the close button, instead of closing the window, the validation message 'field is required' is displayed. If i click it again, then the window gets closed.

    6. When I change the msgTarget: to 'side' or do not set it at all, a validation message/red box is still shown but the window gets closed

    7. One more thing. I am not sure about it but this occurs when I click the mid-top of the button. When I click the bottom portion of the button, I get the same behavior as 6th point mentioned above.


    ExtJS Version: 5.0.1.1255

    Here is the sencha fiddle link:

    http://ift.tt/1wRHQmO


    Note: please provide a workaround as well














  3. Default







    Although I can see why this behaviour may be undesireable, there's no bug here, everything is working as intended.

    The field is configured by default with validateOnBlur: true. When you mousedown on the button, it triggers a blur on the field which causes validation and a subsequent layout to show the error. As such, when the mouseup occurs, the mouse is no longer over the button so the click never happens on the button.


    You can do any of the following:

    a) Configure validateOnBlur: false

    b) Use side/qtip errors

    c) Change the clickEvent on the button to be 'mousedown'








    Evan Trimboli

    Sencha Developer

    Twitter - @evantrimboli

    Don't be afraid of the source code!













[CLOSED] Cannot close window when form field has config msgTarget:'under' and allowBlank:false

Aucun commentaire:

Enregistrer un commentaire