Conversation
martinthomson
left a comment
There was a problem hiding this comment.
Pretty good. Some suggestions.
| <p>Users should be clearly notified when [=keyboard locking=] is active, possibly through browser | ||
| UI indicators. | ||
|
|
||
| <p>There should be a simple and intuitive method for users to override keyboard locking, reverting |
There was a problem hiding this comment.
It would be really nice if we could standardize this. That way, the experience is consistent across browsers.
I don't regard this as essential, but it would be nice.
There was a problem hiding this comment.
Agree... though this might need to happen after browsers ship something and if we all align. I guess it would be a SHOULD (or even MAY) level thing. History suggests that we will naturally converge on a UI/UX convention for this.
Co-authored-by: Martin Thomson <mt@lowentropy.net>
|
Hello. Please forgive me for impudently and unceremoniously barging in :) WebKit has recently received an implementation of Mozilla's proposal, and apparently at some point it will reach Safari and other browsers: https://bugs.webkit.org/show_bug.cgi?id=264843 As a developer of a web-based for remote access device, I'm super-interested in this feature because it's the only blocker that prevents me from recommending Firefox instead of Chrome to my clients. I hope that if this specification is adopted, then eventually things will get off the ground, and it will be done in Firefox too. Considering that we already have an actual implementation, and if there are no problems here, is it worth merging this PR? It looks great. |
|
Per https://webkit.org/blog/17674/release-notes-for-safari-technology-preview-234/ I believe this has shipped in Safari TP. It would be good to check how accurate the spec PR is compared to the implementation and try to get it across the line now there's some implementation interest. |
|
Ok, had a look. the WebKit PR does follow the spec. The only thing is that the tests that were added use WebKit infrastructure, but I think they could be migrated to be fullscreen tests... assuming we can lock and we all generally agree that hitting "ESC" once shouldn't cause fullscreen to cancel if the lock if applied (this might be hard to test across UAs... but we can try). In the meantime we need interest from a second implementer. |
|
As a developer, I would like to note that there is exactly one problem with the current draft/implementation: it is impossible to check the presence or absence of If this is not supported, it would be great to be able to distinguish between these states to alert the user who expects all his keys to be intercepted. It might not be too late to add something for that. |
| "none", | ||
| "system" | ||
| }; | ||
|
|
There was a problem hiding this comment.
This is not what STP is shipping now, are we going to update this or is WebKit going to change?
| <dt><dfn>System-level keyboard lock</dfn></dt> | ||
| <dd><p>Capture a wider range of keys, including those used for system-level navigation and | ||
| shortcuts (e.g., Alt+Tab), subject to user consent and user agent implementation. |
There was a problem hiding this comment.
I think STP is not doing this (I don't see any non-browser shortcut is being captured), do we need this in that case?
Also, can environments like Linux snap/flatpak or Windows sandboxed MSIX support this? Sounds like we would surprisingly expose browser sandbox status if not.
|
I'm concerned that Safari would ship with something nobody agreed on, without an updated PR. If @marcoscaceres is busy I can take this and update it. (In that case I'll exclude system lock mode.) |
| }; | ||
|
|
||
| dictionary FullscreenOptions { | ||
| FullscreenKeyboardLock keyboardLock = "none"; |
There was a problem hiding this comment.
But do we need "none"? Maybe undefined can serve that purpose?
There was a problem hiding this comment.
Maybe... what I like about "none" is that it's explicit about "no lock is applied"... vs undefined, which, yes, could mean "no lock is applied", but also means "undefined behavior (and potentially the browser is applying UA specific behavior)".
My question is, which one do we want? These are subtle, but important differences IMO,
There was a problem hiding this comment.
But keyboardLock: undefined behaves exactly like "none" already?
|
I'm starting to think that all we need for (Because browser shortcuts are already preventDefault-able.) |
|
Are you suggesting that sites looking to avoid things like tab switching have some enumeration of all browser shortcuts and just |
(TIL Firefox and Chrome even allow that...) But anyway that's what Safari is going to ship now - there's no "bypass" as this PR says, all it does is to prevent the escape key to not immediately escape the fullscreen mode. There's no even extra capture for shortcuts, it turns out that both Safari and Chrome already allow the page to capture extra browser shortcuts on fullscreen mode that Firefox currently does not. And I do think it may indeed be easier to just prevent-default those shortcuts in keyboard lock mode, but I'm not sure preventing all shortcuts is a great idea. Is Control+C a browser shortcut to prevent, for example? What is the definition of "browser shortcuts that we want to prevent" here? |
Addresses #231
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff