21 Dec 2012 5:32 AM #1
How to avoid string values of being dragged in number fields
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?
22 Dec 2012 8:42 PM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Use the maskRe configMitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
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.
2 Jan 2013 9:45 AM #3
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.