jQuery UI Widgets › Forums › General Discussions › Editors › NumberInput › Windows vs. Android
Tagged: blur, jqxnumberinput, numberinput, spinMode
This topic contains 1 reply, has 2 voices, and was last updated by Nadezhda 11 years ago.
-
AuthorWindows vs. Android Posts
-
Hi, I’m seeing a difference between desktop and mobile behavior. Using Chrome on both Windows 7 and a Nexus 7.
In Windows, when I change the initial value, 0.07, to 0.08 using the keyboard, then press Enter, jqxNumberInput(“getDecimal”) returns 0.08 as expected; on the Nexus, when I change to 0.08 with the virtual keyboard and press “Go”, it returns 0.07. However, if I use the spin buttons to change the value, the new value IS returned.
Also, I have spinMode=”advanced”. On Windows, the increment changes with the caret position; on the Nexus, the increment is always 1.
Is this WAD?
I’ve provided a test page below.
Thanks.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title></title> <link rel="stylesheet" href="//jqwidgets.com/public/jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script type="text/javascript" src="//jqwidgets.com/public/jqwidgets/jqx-all.js"></script> <script type="text/javascript"> $(document).ready(function () { $("#popupValue") .jqxNumberInput({ decimalDigits: 2, decimal: 0.07, inputMode: 'simple', spinMode: "advanced", spinButtons: true, spinButtonsWidth: 36, width: "100%" }) .keydown( function (event) { if (event.which === 13) { var value = $("#popupValue").jqxNumberInput("getDecimal"); alert("Value = " + String(value)); } } ) }); </script> </head> <body> <div id="popupValue"></div> </body> </html>Hello frunobulax,
Here is an example which shows how to use ‘blur’ event to make the input element to lose focus when “Go” button is pressed: http://jsfiddle.net/mmmbkyq0/.
If ‘spinMode’ is set to ‘advanced’ on desktop is ‘advanced’, but on mobile ‘spinMode’ is always ‘simple’.Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.