Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    13
    Vote Rating
    0
    fullinet is on a distinguished road

      0  

    Exclamation DatePicker select Today with SpaceBar shortcut key inserts a space on the field

    DatePicker select Today with SpaceBar shortcut key inserts a space on the field


    - Detailed description of the problem
    In DatePicker when you select the "today" date with the shortcut key (space bar) a space is inserted in the end of the text in the field, making the field marked as invalid.
    You can test it in the Birthday DateField the Forms example in the "Explorer Demo" ( http://www.sencha.com/examples/explorer.html#forms )

    - Possible solution
    One possible working solution is change the onKeyPress(ComponentEvent ce) method of the KeyNav of the DatePicker class (line 801) from:
    Code:
          public void onKeyPress(ComponentEvent ce) {
            // space bar pressed
            if (ce.getKeyCode() == 32) {
              selectToday();
            }
          }
    to
    Code:
          public void onKeyPress(ComponentEvent ce) {
            // space bar pressed
            if (ce.getKeyCode() == 32) {
              ce.stopEvent();
              selectToday();
            }
          }
    - GXT version
    GXT 2.2.5 - GWT 2.4.0

    - Host mode / web mode / both
    Both modes

    - Browser and version
    IE 8, Firefox 9.0.1, Chrome 17.0.963.12 (dev), Opera 11.60

    - Operating System
    Windows XP SP3

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    The correct solution would be
    Code:
    Index: user/src/com/extjs/gxt/ui/client/widget/DatePicker.java===================================================================
    --- user/src/com/extjs/gxt/ui/client/widget/DatePicker.java	(revision 2473)
    +++ user/src/com/extjs/gxt/ui/client/widget/DatePicker.java	(working copy)
    @@ -791,6 +791,7 @@
           public void onKeyPress(ComponentEvent ce) {
             // space bar pressed
             if (ce.getKeyCode() == 32) {
    +          ce.preventDefault();
               selectToday();
             }
           }

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    13
    Vote Rating
    0
    fullinet is on a distinguished road

      0  

    Default


    Nice,
    I used stopEvent() because I watched onKeyLeft() method.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi