Repository navigation
Conversation
The drag guard in widget-elements.js found its control with
closest("[data-lf-offer]"), which also matches the empty data-lf-offer=""
that every thread card and message wears for chrome. reachedForWords(card)
is true for any selection inside the card, so the click was stopped and
prevented: with words selected in a thread, no button in it (a summary's
Show/Hide earlier messages) responded to the pointer. Enter worked, which
is why the summary test never caught it.
The guard now asks for PRESSABLE, the one statement of what counts as a
press (a non-empty data-lf-offer). A drag that ends on a real control is
still refused, as before.
The summary fold test now clicks the fold button with words selected; it
fails (Chromium and WebKit) without the change and passes with it.
dist/kernel rebuilt.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
Superseded by #3928, which fixes the same fold-button press with words selected and keeps guarding links and drags inside thread messages.
|
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
…3928) With words selected in a thread message, pressing "Show N earlier messages" (or "Hide …") on a summary did nothing, however many times the user pressed it. Enter worked. The cause is the drag guard in `widget-elements.js`, which drops a click it reads as the mouseup that ended a text selection. It asked that of `ev.target.closest("[data-lf-offer]")`. A thread card, a message and the panel's reader all carry an empty `data-lf-offer`, which marks chrome a widget made but not a press, so the closest match for a button inside a card was the card itself. The selection's focus was inside the card, so the guard took every press on every native button and link in that card for the end of a drag. The guard now asks the innermost control the press landed on: `closest(PRESSES, [data-lf-offer])`. A button or link inside widget chrome answers for itself, and a drag that ends on a selectable offer or in a message's words is still refused as before. Evidence: `test_a_summary_folds_its_messages_where_they_stand` now presses the toggle with the pointer while the message's words stay selected, where it used Enter before. It fails on main in Chromium and WebKit (the toggle never folds) and passes with this change. A scratch run of the same journey in Playwright's Firefox also folds and unfolds with the fix. Supersedes #3839 (closed), which changed the same guard to `closest(PRESSABLE)` and carried nothing this change lacks. The two differ only where a press lands on chrome a widget made: #3839 never guards a native button or link without `data-lf-offer`, nor a click ending a drag in a thread message's words; this one asks the innermost control, so a link in a message still refuses the release of a drag that ended in its words, and a drag ending in message prose is refused as before. Ran: that test in both engines, the drag-guard tests (`test_working_the_evidence_in_an_option_is_not_a_pick`, `test_the_draft_box_is_its_own_door`, `test_a_selection_around_a_targets_buttons_does_not_deaden_them`, `test_a_pointer_drag_stops_the_line_offering_the_press_it_refuses`, `test_playground_labels_can_be_selected_without_changing_the_controls`, `test_the_panel_field_offers_selected_words_to_a_press_alone`, `test_a_drag_that_overshoots_the_layer_is_not_a_passage`, `test_a_label_press_keeps_the_controls_current_keyboard_location`), `pnpm run test:runtime`, and `pnpm run build:browser` for the kernel. > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Opus 5.5 (1M context) <[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.
With words selected in a thread message, clicking a summary's "Show/Hide N earlier messages" button did nothing (Enter worked). The capture-phase drag guard in
browser/runtime/widget-elements.jsusedclosest("[data-lf-offer]"), which also matches the emptydata-lf-offer=""on every thread card and message;reachedForWords(card)is then true for any selection in the card, so the click was stopped. This affected every non-offer button inside a thread.The guard now uses
PRESSABLE([data-lf-offer]:not([data-lf-offer=""])), already the module's single statement of what is a press, so the guard and the other passes can't diverge. The guard's purpose (a drag ending on a real control is not a press) is unchanged.Evidence:
test_a_summary_folds_its_messages_where_they_standnow clicks the fold button with words selected. Without the fix it fails in both engines ([browser],[webkit_browser]); with it, both pass.Ran: that test (both engines),
pnpm run test:runtime(545 pass), pre-commit on the changed files,pnpm run build:browser(kernel rebuilt). Not run: the wider browser suite.