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

Unlock the screen orientation when exiting fullscreen #206

Merged
merged 4 commits into from
Nov 24, 2022

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Oct 31, 2022

Closes #202

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

@marcoscaceres
Copy link
Member Author

Unsure who to ping for comment on for Gecko.

fullscreen.bs Outdated Show resolved Hide resolved
fullscreen.bs Outdated Show resolved Hide resolved
@marcoscaceres
Copy link
Member Author

Checked Gecko (Firefox Nightly on Android with prefs orientation prefs enabled) and it does also exhibit this behavior (it unlocks the orientation lock when exiting full screen). Where it differs is that it doesn't reject the orientation lock's pending promise - but that is minor.

@EdgarChen, given the above, would you be supportive of this change?

@EdgarChen
Copy link
Member

Yes, Gecko unlock the orientation lock after document exits fullscreen, see https://searchfox.org/mozilla-central/rev/17349477695facefe7d180d7afc2b74a965c21db/dom/base/ScreenOrientation.cpp#715, so it looks good to me. I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1798646.

@marcoscaceres
Copy link
Member Author

@whatwg/documentation just a heads up about this integration. The tl;dr being that orientation lock is automatically released when exiting full screen (i.e., developer don't need to call screen.orientation.unlock() before exiting fullscreen, as the browser will do the right thing for them).

@marcoscaceres marcoscaceres added the impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation label Nov 8, 2022
@marcoscaceres
Copy link
Member Author

I think the CI error is unrelated to this change:

LINK ERROR: No 'dfn' refs found for 'ancestor browsing context'. 

fullscreen.bs Outdated Show resolved Hide resolved
@marcoscaceres

This comment was marked as off-topic.

@marcoscaceres

This comment was marked as off-topic.

@marcoscaceres
Copy link
Member Author

@annevk any criteria that I've missed that is preventing this from being merged?

@annevk
Copy link
Member

annevk commented Nov 14, 2022

This looks good to me, but @foolip is the editor and should probably weigh in.

@marcoscaceres
Copy link
Member Author

@foolip, ping 🛎️

@foolip foolip merged commit 4a1f34a into whatwg:main Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation
Development

Successfully merging this pull request may close these issues.

Exiting full screen should unlock screen orientation
5 participants