如何在基于 GWT 的应用程序中禁用虚拟键盘?
How to disable the virtual keyboard in GWT based application?
我们正在 GWT 中开发一个信息亭应用程序,为此,我们正在使用自定义虚拟键盘,我们想禁用默认虚拟键盘。提前致谢。
您尝试设置 属性 inputView
了吗?
如果设置,默认的虚拟键盘将不会显示。
Got the solution by using JSNI(native javascript) and it works perfectly, but i don't know it is the best way. I have written code such as follows.
step1:
Get an id of the active element(i.e., INPUT and type="text" element)
step2:
Then immediately call the blur() event on that element (Now the element will lost it's focus and default virtual keyboard doesn't showup)
step3:
Now again immediately call the focus() event on the same element(Note: Keyboard doesn't show up here, it just unblur that element ).
step4:
Now by using the retrieved id, enter the data into textbox through custom virtual keyboard.
我们正在 GWT 中开发一个信息亭应用程序,为此,我们正在使用自定义虚拟键盘,我们想禁用默认虚拟键盘。提前致谢。
您尝试设置 属性 inputView
了吗?
如果设置,默认的虚拟键盘将不会显示。
Got the solution by using JSNI(native javascript) and it works perfectly, but i don't know it is the best way. I have written code such as follows.
step1:
Get an id of the active element(i.e., INPUT and type="text" element)
step2:
Then immediately call the blur() event on that element (Now the element will lost it's focus and default virtual keyboard doesn't showup)
step3:
Now again immediately call the focus() event on the same element(Note: Keyboard doesn't show up here, it just unblur that element ).
step4:
Now by using the retrieved id, enter the data into textbox through custom virtual keyboard.