This is a migrated thread and some comments may be shown as answers.

HTML number input - Empty string instead of a number bug

3 Answers 188 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Veteran
Ron asked on 01 Nov 2015, 03:22 PM

Hi,


We have the following problem. For some reason when we use HTML input with type "number" on a real device (not a web browser), deleting the minus sign results with an input element that shows the user a number while the value of the input element is empty string.


Kendo validator is attached to this input element, but we are not certain the problem has anything to do with the validator. We think it might be because there is shadow-content associated with the element on mobile devices.

The attached screens demonstrates the issue: in number-input-before-delete-minus-sign-GOOD.PNG you can see the input value right after we entered it and the minus sign was added correctly by code (*-1); in number-input-after-delete-minus-sign-BAD.PNG you can see that after manually removing the minus sign from the input field by the user, testing the input value shows empty result. The screens were taken from iPhone 5s running iOS 8.4.1 but the same problem occurs in other devices (other OSs) as well.

We created the following Dojo with which you can experience the problem: http://dojo.telerik.com/opiNA/5
Dojo instructions: Enter a positive number (e.g. 3); Click the test value button - you will see the element value is -3 as expected, because the code takes the original value and multiply it by -1 . Now Delete the minus sign. You would expect the test value, which simply shows the element value, will show you 3. But it will show you nothing. For some reason the value became an empty string even though we can still see the value in the HTML element.

Any idea how we can handle this issue?


Thanks,

 

Ron.

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 04 Nov 2015, 08:57 AM
Hello Ron,

Could you please elaborate more on how exactly this issue is related to Kendo UI? From the provided information it seems that the value is modified using regular JavaScript and therefor it can be reproduced without our controls.

Also I tested the demo on Windows phone, IPad and nexus device and it's not reproducible on either of these. 

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ron
Top achievements
Rank 1
Veteran
answered on 04 Nov 2015, 02:51 PM

Hello Vladimir,


We thought it might be related to the use we make there with Kendo validator. We have tested it on several iOS versions and it repeated in them all.


If not related to Kendo UI we will post it on stack overflow (will be happy to know either way if you have any idea).

Regards,

Ron.
0
Vladimir Iliev
Telerik team
answered on 05 Nov 2015, 10:38 AM
Hi Ron,

Please note that I also tested the provided demo on both iOS v8 and v9 using iPhone 5S and it's not reproducible on either of these devices - that why the issue is most probably related to the exact versions of Safari / iOS that you are using. 

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Validation
Asked by
Ron
Top achievements
Rank 1
Veteran
Answers by
Vladimir Iliev
Telerik team
Ron
Top achievements
Rank 1
Veteran
Share this question
or