Code Monkey home page Code Monkey logo

Comments (8)

any86 avatar any86 commented on June 3, 2024

感谢反馈, 确实有这个"bug".

我写这个插件的时候, 印象里相关文章说过F11的全屏和requestFullScreen API唤醒的全屏不一样, 所以F11打开的全屏通过API关闭不掉, 所以监测也是不行的, 我再找找相关文章确定下.

from be-full.

Aron-Liu avatar Aron-Liu commented on June 3, 2024

请问怎么调用f11的api

from be-full.

any86 avatar any86 commented on June 3, 2024

请问怎么调用f11的api

不知道啊, 现在的全屏插件都是调用的api, 不能调用f11的全屏, 至今未研究出如何统一这2种方式

from be-full.

any86 avatar any86 commented on June 3, 2024

突然想到了一个办法: 阻止F11的默认事件, 然后执行js的全屏API, 暂时不敢改, 怕有的别的bug, 想听听大家的意见.

window.addEventListener('keydown',e=>{
    if(122 === e.keyCode){
         e.preventDefault();
         beFull();
    }
})

这样就可以正确的检测全屏状态了

from be-full.

shiy-liu avatar shiy-liu commented on June 3, 2024

突然想到了一个办法: 阻止F11的默认事件, 然后执行js的全屏API, 暂时不敢改, 怕有的别的bug, 想听听大家的意见.

window.addEventListener('keydown',e=>{
    if(122 === e.keyCode){
         e.preventDefault();
         beFull();
    }
})

这样就可以正确的检测全屏状态了

可是mac 全屏切换是 com+shift+F 还是没办法统一

from be-full.

any86 avatar any86 commented on June 3, 2024

@shiy-liu
不统一到没啥, 可以写兼容, 就是这种兼容方式, 我不知道会不会有别的影响. 看看大家的意见, 如果和现有别的操作不冲突, 那我就把快捷键给拦截了.
这个issue后续一直没人回复, 我就没敢修改, 再等等用的人多了的反馈吧

from be-full.

davy-gan avatar davy-gan commented on June 3, 2024

可以直接监听window的resize 来判断全屏切换操作

from be-full.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.