Repository navigation
fix: keep full screen when Escape is pressed in a web page - #255
Open
barto95100 wants to merge 2 commits into
Open
barto95100 wants to merge 2 commits into
barto95100 wants to merge 2 commits into
Conversation
Escape not handled by the page travels up the responder chain as cancelOperation(_:) and reached the window, which exits full screen. Stop it at the page host view, after WebKit, so pages still get the key. Like Safari, it now stops a page that is still loading. Fixes the-ora#179.
[Medium impact] The change affects Escape handling in browser pages. The PR appears safe to merge, with a non-blocking gap in coverage for stopping page loads. Findings
SummaryKeeps unhandled Escape from reaching the window through
Reviews (1) · Last reviewed commit: "fix: keep full screen when Escape is pre..." · Reviewed by Greptile |
The handler that stops a loading page on Escape was replaced by a counter in the test, so the stop-loading rule itself was untested. The handler now takes any LoadingStoppable page (BrowserPage conforms), and tests check through the host view that Escape stops a loading page and leaves a loaded one alone.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #179.
Escape not handled by the page travels up the responder chain as
cancelOperation(_:)and reached the window, which exits full screen. It is now stopped at the page host view, after WebKit, so pages still receive the key (closing their own dialogs, players…). Like Safari, Escape also stops a page that is still loading.Type of Change
Testing
AI Assistance Disclosure
Code written with Claude (AI) under my direction; I reviewed and tested every change on macOS.
Checklist