Skip to content
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

Closing the fullscreen via "X" or Esc key doesn't toggle the full screen icon back #38

Closed
omarpalacios opened this issue May 2, 2021 · 3 comments

Comments

@omarpalacios
Copy link

close_fullscreen.mp4

When the "X" (one icon to the right just next to it) or the Esc key is pressed, the full screen icon is not toggling its sprite correctly (it ends showing the exit full screen instead of enter full screen icon).

This is only a minor visual bug on the icon, the actual entering/exiting of the full screen is working correctly.

The third way I found to exit the full screen is by clicking the full screen icon while in full screen, this however toggles the icon back correctly and is working as intended.

I'm using FireFox 88.0 (64 bits).

@ts-thomas
Copy link
Collaborator

Yes, that's a side-effect when toggling the fullscreen manually. Sadly a global key listener will not trigger the event when pressing Esc to leave the fullscreen. I could try to add a resize listener, or some kind of observer to catch the fullscreen switch when toggled manually. The reason why the icon still have the correct behavior when clicked on it is, when leaving the fullscreen a false state will trigger fullscreen instead (it reduces the side-effect to just visually false). These check needs to be assigned on one of the listeners which could be catched by a fullscreen toggle. That is something which I could fix very soon.

Thank you for the hint.

@ts-thomas
Copy link
Collaborator

Btw, when clicking the close icon, I just forget to reset state, that will be fixed in the next commit.

@ts-thomas
Copy link
Collaborator

The new version 0.7.2 has a perfect workaround for this. But it comes with a tiny drawback. When a user entering the fullscreen state manually the icon goes hidden, because there is no way to leave a manual toggled fullscreen state due to a restriction by the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants