1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    33
    Vote Rating
    0
    santosr666 is on a distinguished road

      0  

    Default How to avoid string values of being dragged in number fields

    How to avoid string values of being dragged in number fields


    Hi guys,

    Hope you can help me with this issue:

    I have a textfield with a numeric mask, so, user can type only numbers.

    Case is, my dear tester is selecting the URL in the browser and dragging it to the mentioned field and it works fine for him, badly to me :-)

    Any hints how could I avoid it?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,017
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Use the maskRe config
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    33
    Vote Rating
    0
    santosr666 is on a distinguished road

      0  

    Default


    We already have our own way to deal with incorrect values. In this case, we need to apply same mask used for "paste" event and not show field as incorrect, but I could not managed to get the "drag"/"drop" event. I have tried "mouseup" as well without succeed.

    Any other hint?

    ... by the way, maskRe doesn't work as well. What worked was to change the textfield to numberfield, but my mask is not always a number.

Thread Participants: 1

Tags for this Thread