HTML number input - Empty string instead of a number bug

4 posts, 0 answers
  1. Ron
    Ron avatar
    122 posts
    Member since:
    Sep 2011

    Posted 01 Nov 2015 Link to this post

    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.

  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 04 Nov 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Ron
    Ron avatar
    122 posts
    Member since:
    Sep 2011

    Posted 04 Nov 2015 in reply to Vladimir Iliev Link to this post

    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.
  5. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 05 Nov 2015 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready