I cannot use alphanumeric keyboard in a input element when using the FullScreen API in Google Chrome

拟墨画扇 提交于 2019-12-07 05:06:18

问题


In Google Chrome, when I am using FullScreen API and I try to type in alphanumeric content in the input element it does not do anything. It works in Firefox.

Is their a workaround to this problem in Google Chrome?


回答1:


docElm.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);

check this link

Content from link:

Full screen with key input

For security reasons, most keyboard inputs have been blocked in the fullscreen mode. However, in Google Chrome you can request keyboard support by calling the method with a flag:

docElm.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);

This does not work in Safari, and the method won’t be called.

With Firefox, we are discussing and looking into various ways of how we we could add keyboard input support without jeopardizing the end user’s security. One suggestion, that no one has implemented yet, is the requestFullscreenWithKeys method, which in turn would trigger certain notifications for the user.



来源:https://stackoverflow.com/questions/10562148/i-cannot-use-alphanumeric-keyboard-in-a-input-element-when-using-the-fullscreen

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