Repository navigation
native2: selecting web text focuses the page, so Edit > Copy copies it (#188) - #189
Merged
Merged
Conversation
#188) Why: native2/Sources/DesktopMac/WebText.swift | Safari focuses its address field when it opens a page in the background, so Copy after a marker selection copied the URL; focus the web area before selecting, since focusing can move the selection Why: scripts/live-check.mjs | Safari disables Copy and has no in-window keyboard focus while inactive, so the #88 copy runs Edit > Copy after desktop_activate; background Command-C and Edit > Copy are refused
Merged
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.
Closes #188.
Cause: Safari opens a page in the background with its address field focused. Copying after a marker selection therefore took the page URL, even after
desktop_activate. In the background, Safari's Copy is disabled, and background Command-C is refused because Safari's keyboard focus isn't in its window.Fix:
desktop_selecton web text sets the web area'sAXFocusedfirst, as a click in the page would, then selects and reads back.desktop_activateSafari, thendesktop_menuEdit > Copy, as for Preview. The old guidance said to press Command-C, which never copied from a background Safari on either stack.Live on the dev app (main plus this change):
desktop_activate, Edit > Copybrown fox jumpslive-check --only 88: both checks pass. Node tests 104/104, native2 tests 45/45, and the contract is regenerated.