简体   繁体   English

jQuery:iPhone数字小键盘未在本机应用程序中关闭

[英]jQuery: iPhone numeric keypad not closing in a native app

There are three radio buttons being displayed in a modal window with a close icon in the header. 模态窗口中显示三个单选按钮,标题中带有关闭图标。

  1. First radio button is just a standard radio button option with a label. 第一个单选按钮只是带有标签的标准单选按钮选项。
  2. Second radio button has an input text field which accepts only numbers 第二个单选按钮的输入文本字段仅接受数字
  3. Third radio button also has another input text field which also accepts only numbers. 第三个单选按钮还具有另一个输入文本字段,该字段也仅接受数字。

Issue: When this modal window is triggered and if the user taps on 2nd or 3rd radio button, the numeric keypad comes automatically. 问题:触发此模式窗口时,如果用户点击第二或第三单选按钮,则数字小键盘会自动出现。 But, if the user doesn't enter any value and simply chooses to close the modal window by tapping on the close icon in the header of modal, the numeric keypad isn't closing along with modal window. 但是,如果用户未输入任何值,而只是选择通过点击模式标题中的关闭图标来关闭模式窗口,则数字小键盘不会与模式窗口一起关闭。

If the user taps on 2nd or 3rd radio buttons and then again taps on the first radio button before closing the modal, then the numeric keypad hides as expected. 如果用户点击第二个或第三个单选按钮,然后在关闭模态之前再次点击第一个单选按钮,则数字小键盘会按预期隐藏。

Any suggestions on how to debug this issue will be helpful. 关于如何调试此问题的任何建议将很有帮助。

A snippet of the actual HTML/JS would help, but at a guess I'd look at the last input in the control still having focus when you hide the modal dialog. 实际的HTML / JS片段会有所帮助,但是我想当您隐藏模式对话框时,我会看一下控件中的最后一个输入仍然具有焦点。

Make sure that the close icon on the modal is a <button> rather than just an image with a click event - this will ensure that the focus switched correctly. 确保模式上的关闭图标是<button>而不是带有click事件的图像-这将确保焦点正确切换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM