在 Google Chrome 中,当我使用 FullScreen API 并尝试在输入元素中输入字母数字内容时,它没有执行任何操作。它适用于 Firefox。
他们是 Google Chrome 中这个问题的解决方法吗?
最佳答案
docElm.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
检查 this 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.
关于javascript - 在 Google Chrome 中使用全屏 API 时,我无法在输入元素中使用字母数字键盘,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10562148/