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

Reject acquisition of SKL when not in fullscreen (rather than silently not working) #9

Closed
garykac opened this issue Apr 26, 2017 · 1 comment

Comments

@garykac
Copy link
Member

garykac commented Apr 26, 2017

From @mgiuca on March 23, 2017 2:0

The spec currently proposes that requestSystemKeyboardLock always succeed (in fact it does not define any possibility of failure; see #7). If not in full-screen, it is supposed to succeed but do nothing until fullscreen is entered.

Rather, it should reject if called when not in full-screen. When the enable keyboard lock flag is set, keyboard lock should work (and there should be no clause in "Handling Keyboard Events" that checks if full-screen).

Similarly, enable keyboard lock should be cleared when exiting full-screen.

Copied from original issue: garykac/system-keyboard-lock#9

@garykac
Copy link
Member Author

garykac commented Apr 26, 2017

From @jamiewalch on March 23, 2017 18:4

The reason we wrote it this way was to make it easier for sites to use the API. Given that it is inherently best-effort (there's no way to deliver Ctrl+Alt+Del on Windows, for example), sites have to be able to handle not receiving the keys they asked for anyway. That being the case, it's easier for them to request the keys they want up-front, rather than requiring they do it every time the user enters full-screen. It also removes any question of whether a site needs to wait for a full screen event to fire before calling the API, or whether it can be called immediately after calling requestFullScreen. Finally, it allows the API to work for user-initiated full-screen, which has no associated notification event (although it's possible that we decided to restrict this to programmatic full-screen mode--I don't recall).

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

1 participant