PDA

View Full Version : How to avoid string values of being dragged in number fields



santosr666
21 Dec 2012, 5:32 AM
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?

mitchellsimoens
22 Dec 2012, 8:42 PM
Use the maskRe config

santosr666
2 Jan 2013, 9:45 AM
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.