w3c / screen-orientation

The screen orientation lock specification
https://w3c.github.io/screen-orientation/
Other
27 stars 29 forks source link

Page visibility transition can fire when false/true/false happens within a frame #179

Closed toddreifsteck closed 2 years ago

toddreifsteck commented 5 years ago

Due to how the Page Visibility transition portion of https://www.w3.org/TR/screen-orientation/#Screen-orientation-change is written, if a transition from NOT VISIBLE to VISIBLE to NOT VISIBLE happens within a frame, the processing model will currently deliver an event.

I advise adding a new step 1 which exits if the page visibility is NOT VISIBLE.

marcoscaceres commented 5 years ago

@toddreifsteck can you help me integrate with https://github.com/w3c/page-visibility/pull/50 ? That will give us the hooks for "visible" and "hidden". Would appreciate a pull request on this spec once that lands to fix the issue you describe above.

toddreifsteck commented 5 years ago

Slammed for next few days. Assigning this to myself for TODO next week.

marcoscaceres commented 5 years ago

Understood. I'm the same. We got time tho :) If I get time, I'll try to slap something together and ping you.

marcoscaceres commented 2 years ago

Now handled in the spec. This should also be handled once the visibility stuff moves to HTML.