turning off form assistant in mobile safari?

柔情痞子 提交于 2019-12-24 01:53:40

问题


When running on a touchscreen device (iPhone, in my case, but I presume it does this on others), when the virtual keyboard pops up for a form field, there are added navigation buttons at the top of the keyboard: "previous", "next", "done". (And sometimes "autofill").

This is apparently the Mobile Safari "form assistant".

I find this redundant, superfluous, and confusing. iPhone users aren't used to this in native apps, and it's unnecessary. It's a touch device. You touch what you want to change. There's no need for navigation buttons!

I suppose users may be familiar with this, IF they use their device often to fill forms on websites. I've had an iPhone since the 3G, and never noticed this. I don't think I've ever filled a form on Mobile Safari! (I would use my desktop...)

The form assistant is there for navigating forms on websites, which might not be designed appropriately for a mobile device. So, in that context it serves a useful purpose.

But when using JQuery Mobile, you ARE designing an interface for use on a touchscreen mobile device. There shouldn't be a need for the form assistant. I find it particularly annoying in a local app (PhoneGap, Rhodes, etc.).

I've done some searches, and haven't come up with a solution.

Does anybody know how to turn this off?


回答1:


There is no solution for mobile Safari, but for PhoneGap there certainly is.

As of 2.6.0 there is an option in the config.xml

<preference name="HideKeyboardFormAccessoryBar" value="true" />

For versions before 2.6.0, or more sophisticated use, there is the KeyboardToolbarRemover, which even allows to dynamically show and hide the keyboardAcessoryView.

In your Javascript, include the module

var toolbar = cordova.require('cordova/plugin/keyboard_toolbar_remover');

To disable the toolbar

toolbar.hide()

To re-enable the toolbar

toolbar.show()



回答2:


sorry, its not possible to remove the Form Assistant inside mobile safari.



来源:https://stackoverflow.com/questions/8459282/turning-off-form-assistant-in-mobile-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!