javascript - 在 Google Chrome 中使用全屏 API 时,我无法在输入元素中使用字母数字键盘

标签 javascript google-chrome fullscreen

在 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/

相关文章:

javascript - div 里面的 div,搞砸了

google-chrome - 私有(private) Beta 测试 Chrome 扩展程序

cocoa - 应用程序在启动时全屏显示

javascript - 滚动到 botframework 网络聊天中气泡的顶部

javascript - 代码在控制台中有效,但在 Hackerrank 中无效

javascript - 区分 +0 和 -0

html - 我的网站在 FireFox 和 Google Chrome 中看起来一样,但在 IE 中不一样

html - Firefox 尺寸渲染对比其他浏览器

html - 在网页中使一个元素全屏

swing - 使用跷跷板启用全屏?