cubing / cubing.js

🛠 A library for displaying and working with twisty puzzles. Also currently home to the code for Twizzle.
https://js.cubing.net/cubing/
GNU General Public License v3.0
232 stars 42 forks source link

Fullscreen button doesn't leave fullscreen when player is wrapped in an additional shadow DOM #248

Open lgarron opened 1 year ago

lgarron commented 1 year ago

Steps to reproduce the issue

  1. Go to https://experiments.cubing.net/cubing.js/twisty/twizzle-link.html
  2. Click the fullscreen button (lower left) on the first player.
  3. Once fullscreen, press the button again.

Observed behaviour

The player leaves fullscreen, because document.fullscreenElement is not equal to the player element inside <twizzle-link>.

Expected behaviour

The player doesn't leave fullscreen unless you press the escape key.

Environment

Chrome stable.

🖼 Screenshots

No response

Additional info

No response