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,966
    Vote Rating
    130
    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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar