Repository navigation
Take the pointer for a thread only on its marked words, not anywhere in a marked element - #7322
Merged
Merged
Conversation
…in a marked element A thread on a whole element, such as an open item's section, was under the pointer wherever the pointer stood inside the element's box. A pointer resting anywhere in the section, its empty band margin included, previewed the thread after the dwell and showed the hand, and a click on any of its words opened the thread. On the diagram-width page that box was 1672 x 810 px. Since #1424 an element draws no mark for its threads at rest, so nothing on screen said the section held one. #1448 stopped the pointer raising the element's contour for this reason; #5618 then gave element marks the thread preview, which brought the section-wide target back. The hit test (`markHit` in anchor-paint.js) now finds passage marks alone. An element's thread takes no hand, preview, press or finger hold on the page; its margin entry previews it, opens it and traces the element, as before. The element index and the climb from the hit element go. Behaviour the tests protect, changed: - A click on an element with a thread, such as a figure or an image, no longer opens the thread. Tests that opened an element's thread by pressing it press its margin entry, or anchor to a passage. - The seam tests for a press and a tap opening the thread the hover promised now straddle two marked lines of one paragraph (`MARK_SEAM_PAGE`), since two marked elements no longer take a press. - The test that the current location holds through a press now presses a passage's mark. - The element-mark pointer test now asserts that an image's thread shows no hand or preview to a pointer or a held finger, and that its margin entry previews it.
leaf-agent
previously approved these changes
Nov 26, 2026
… passages or margin entries - The armed-cursor table expects no hand at rest on an item a thread is on as a whole, and its tab-stop row now stands in a marked passage, so it checks that marked words in a control keep the control's cursor. - The hand test keeps only its armed-button case, which nothing else covers. - A press on a mark in the chrome can no longer reach an element's thread, and placement finds passages only in the page's words, so the test of that refusal goes. - The ring test asserts no mark hand in a marked element; the visual surface test opens its part's thread from the margin marker; the re-staged section test anchors to the section's words, so the pointer finds the mark in the new shadow tree.
leaf-agent
approved these changes
Nov 26, 2026
This was referenced Nov 27, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 27, 2026
…s on their words (#7337) Four browser tests have failed on `main` since #7322. That change made a press anywhere in an element stop opening the element's thread: the thread now opens only from its margin entry, and a press opens a passage's thread only on its inked words. `tests/browser` runs only on pushes to `main`, so #7322's own CI didn't run these four, and each still opened a thread by pressing an element. - `test_render_aim.py`: `test_a_non_geometry_visual_surface_uses_one_box_for_aim_and_mark` and `test_a_shadow_visual_surface_is_clipped_by_its_host` now open the part's thread from its margin entry, as #7322 did for `test_a_visual_surface_narrows_paint_without_narrowing_semantic_interaction`. The shadow test then hovers the surface before Alt, since the pointer no longer rests on it. What each test asserts about the mark and the aim is unchanged. - `test_threads_in_panel.py`: `threads_page` anchors each section's thread to words in the section rather than to the whole section. `test_open_in_panel_and_show_on_page_choose_where_threads_open` and `test_a_press_on_words_the_panel_opens_over_brings_them_clear` press those words with `word_point`. A locator click on the `<p>` would press the middle of its box, past the end of its short text. This keeps #7322's behavior and changes only how the tests reach the thread. All four fail on `main` and pass with this change, and so does the rest of `test_threads_in_panel.py`, which shares `threads_page`. Refs #7334 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
A thread on a whole element, such as an open item's section, was under the pointer anywhere inside the element's box: a pointer resting in the section's empty band margin previewed the thread and showed the hand, and a click on any of its words opened it. Elements draw no mark for their threads at rest (#1424), so this was an invisible target the size of the section (1672 × 810 px on the page that reported it). The hit test in
anchor-paint.jsnow finds passage marks alone; an element's thread is reached by its margin entry, which already previews it, opens it and traces the element.To weigh: a click on an image or figure that holds a thread no longer opens that thread. #1448 removed the hover contour from elements for the same reason; #5618 had brought the section-wide target back through the preview.
Tests that pressed an element to open its thread now press its margin entry or anchor to a passage; the press/tap seam tests straddle two marked lines (
MARK_SEAM_PAGE). The user asked for this on their Leaf page.