Comments (8)
感谢反馈, 确实有这个"bug".
我写这个插件的时候, 印象里相关文章说过F11的全屏和requestFullScreen API唤醒的全屏不一样, 所以F11打开的全屏通过API关闭不掉, 所以监测也是不行的, 我再找找相关文章确定下.
from be-full.
请问怎么调用f11的api
from be-full.
请问怎么调用f11的api
不知道啊, 现在的全屏插件都是调用的api, 不能调用f11的全屏, 至今未研究出如何统一这2种方式
from be-full.
突然想到了一个办法: 阻止F11的默认事件, 然后执行js的全屏API, 暂时不敢改, 怕有的别的bug, 想听听大家的意见.
window.addEventListener('keydown',e=>{
if(122 === e.keyCode){
e.preventDefault();
beFull();
}
})
这样就可以正确的检测全屏状态了
from be-full.
突然想到了一个办法: 阻止F11的默认事件, 然后执行js的全屏API, 暂时不敢改, 怕有的别的bug, 想听听大家的意见.
window.addEventListener('keydown',e=>{ if(122 === e.keyCode){ e.preventDefault(); beFull(); } })这样就可以正确的检测全屏状态了
可是mac 全屏切换是 com+shift+F 还是没办法统一
from be-full.
@shiy-liu
不统一到没啥, 可以写兼容, 就是这种兼容方式, 我不知道会不会有别的影响. 看看大家的意见, 如果和现有别的操作不冲突, 那我就把快捷键给拦截了.
这个issue后续一直没人回复, 我就没敢修改, 再等等用的人多了的反馈吧
from be-full.
可以直接监听window的resize 来判断全屏切换操作
from be-full.
Related Issues (8)
- UC浏览器不行 HOT 6
- ios无效 HOT 4
- 支持ie10吗 HOT 1
- API有没有开启和退出全屏的事件回调 HOT 3
- 全屏方法不能js触发,只能手动触发,这个机制是什么原因呢? HOT 2
- 可以实现自动全屏吗 HOT 1
- isFull 有bug, beFull切换之后, isFull有延迟性 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from be-full.