Repository navigation
test: find a word for a double-click only where the browser draws it - #7336
Merged
Merged
Conversation
Since #7317 a Markdown file's preview keeps the file's <style>, so the README in the double-click test holds "Gizmo" first in its style's text. word_point took that first text node, whose range has no box, and pressed the page's corner, so the double-click landed on the page's heading and the editor never took focus. word_point now skips text that draws no box. The test failed on main since #7317 and passes with this. Refs #7334
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.
test_a_double_click_on_the_rendered_copy_types_at_its_line_in_the_editorhas failed onmainsince #7317, which landed ten minutes after #7315 added the test. #7317 switched a Markdown file's preview to DOMPurify's defaults, which keep the file's<style>. The test's README holds<style>.Gizmo { color: red }</style>ahead of<strong>Gizmo</strong>, soword_pointtook the style's text node first. That range draws no box, so the double-click pressed the window's corner. It selected the page's heading ("Notes"), and the editor never took focus.word_pointnow skips any text that draws no box and raises if no drawn copy of the word exists. The product's double-click mapping needs no change: with the press on the visible "Gizmo", every word in the test lands on its line. The test fails onmainand passes with this change. So do the other callers ofword_point, intest_reading_place.py,test_draft_editing.py,test_render_files.pyandtest_threads_in_panel.py.Refs #7334 — automated triage