Results 1 to 3 of 3

Thread: How to avoid string values of being dragged in number fields

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    33
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Use the maskRe config
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    33
    Vote Rating
    0
      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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •