Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Location
    Hamilton, New Zealand
    Posts
    30
    Vote Rating
    0
    troyg is on a distinguished road

      0  

    Default [FNR] NumberField allowing decimals when explicitly disabled

    [FNR] NumberField allowing decimals when explicitly disabled


    GWT Version: 2.1.0
    GXT Version: 2.2.1

    With a NumberField, I've limited the input to only allow Integers... (as described in the javadoc)

    Code:
    NumberField numberField = new NumberField();
    numberField.setPropertyEditorType(Integer.class);
    But the problem is the user can still enter decimals.
    So I tried the using the setAllowDecimals feature

    Code:
    numberField.setAllowDecimals( false );
    But the user can still enter decimals.

    After debugging, I found onKeyPress method of SpinnerField was never reaching the allowed keys section of code, and was jumping out early due the decimal character being classed as a "special" key (Key number of 46)

    Let me know if you want a more complete example, as per the guidelines.. I just figured this is such a simple bug to explain.

    FYI: I found thread where someone had reported a similar problem for GXT 1.x -it may be caused by the same bug?
    http://www.sencha.com/forum/showthre...ecimal+Integer

  2. #2
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Location
    Hamilton, New Zealand
    Posts
    30
    Vote Rating
    0
    troyg is on a distinguished road

      0  

    Default


    I hate it when people "bump" threads, 5 minutes after posting. But thought this was a fair amount of time to..... *BUMP*

    Is this a confirmed bug? I was expecting there to be some feedback by now, saying it will be fixed in 3.x etc.

    Cheers
    Troy

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    2
    Vote Rating
    0
    rmthamer is on a distinguished road

      0  

    Default


    I've had this same problem and ended up overriding the onKeyPress method to specifically check if the character is a '.'. The problem appears to be that the fe.isSpecialKey(getKeyCode(fe.getEvent()) logic doesn't work across all systems (I'm using a Mac)

  4. #4
    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


    This should be fixed in SVN now as of revision 2410

Similar Threads

  1. [1.2.1] NumberField (Integer) allows decimals
    By jonjanisch in forum Ext GWT: Bugs (1.x)
    Replies: 0
    Last Post: 13 Jan 2009, 1:54 PM
  2. Allowing Zero (0) at the front of a NumberField?
    By junkzilla in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 Oct 2008, 7:58 AM
  3. Force NumberField to display decimals
    By thomas.de in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 29 Sep 2008, 6:35 AM
  4. Firefox 2.0 allows decimals in numberfield even though false
    By thejoker101 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 20 Mar 2007, 8:55 AM

Thread Participants: 2

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