You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec currently proposes that requestSystemKeyboardLockalways 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.
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).
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
The text was updated successfully, but these errors were encountered: