-
-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No change event fired Safari 12.1 #134
Comments
I encountered the similar problem. In my case the change event is not fired both on the latest chrome and safari. I found out this line https://github.com/sindresorhus/screenfull.js/blob/35c1a9eb34fd1c1a652b01e82b8d9a8357a679a6/src/screenfull.js#L64 is no longer effective. That logic assumes if document has exitFullscreen property, it implements the standard API. I tested if that logic still applies to the latest chrome, and it turns out the webkit implemented exitFullScreen, but the 'fullscreenchange' event has not been introduced yet. It would be great if I could submit a pr for this matter. I am trying to figure out the cleanest way to address this problem. |
The change event is being fired for me on Safari 12.1 and Chrome 74. |
Just an idea: Maybe try to move the code from the constructor to onComponentDidMount. |
Hello,
The change event is no longer being fired in Safari 12.1 on Mac OS. This code is running inside a custom web component. This is my code (stripped down just to show how I am using your module):
`import screenfull from "screenfull"
class ScreenFullScreen {
constructor() {
screenfull.on("change", () => {
console.warn("Am I fullscreen?", screenfull.isFullscreen ? "Yes" : "No")
})
}
new ScreenFullScreen()`
The page does go into fullscreen but this event never gets captured. This app is running in a webpack environment.
The text was updated successfully, but these errors were encountered: