pdf.js/test/integration
Nicolò Ribaudo 64a0e59662
Disable link annotations during text selection
When selecting text, hovering over an element
causes all the text between (according the the dom
order) the current selection and that element to
be selected.

This means that when, while selecting, the cursor
moves over a link, all the text in the page gets
selected. Setting `user-select: none` on the link
annotations would improve the situation, but it
still makes it impossible to extend the selection
within a link without using Shift+arrows keys on
the keyboard.

This commit fixes the problem by setting
`pointer-events: none` on the `<section>`s in the
annotation layer while selecting some text. This
way, they are ignored for hit-testing and do not
affect selection.

It is still impossible to _start_ a selection
inside a link, as the link text is covered by the
link annotation.

Fixes #18266
2024-07-23 10:42:34 +02:00
..
.eslintrc Implement a linting rule to discourage using waitForTimeout for new tests 2024-04-09 16:12:15 +02:00
accessibility_spec.mjs Avoid to aria-hide the structure tree (bug 1894849) 2024-05-03 14:39:43 +02:00
annotation_spec.mjs [api-minor][Editor] When switching to editing mode, redraw pages containing editable annotations 2024-07-02 14:11:40 +02:00
caret_browsing_spec.mjs Introduce a getRect utility function for the integration tests 2024-05-23 18:40:03 +02:00
copy_paste_spec.mjs Fix a race condition involving the waitForEvent integration test helper function 2024-06-26 15:25:33 +02:00
find_spec.mjs Fix the "must highlight text in the right position" integration test 2024-04-11 13:42:08 +02:00
freetext_editor_spec.mjs Use BiDi protocol for Chrome tests 2024-07-07 17:12:00 +02:00
highlight_editor_spec.mjs [Editor] When in non-editing mode, add a new editor only once the editing mode has switched 2024-07-15 21:04:52 +02:00
ink_editor_spec.mjs Simplify the integration test in adding a function to turn on/off an editing tool 2024-05-27 11:33:52 +02:00
scripting_spec.mjs Introduce a waitForScripting helper function and use it in all scripting integration tests 2024-07-06 19:29:45 +02:00
stamp_editor_spec.mjs [api-minor][Editor] When switching to editing mode, redraw pages containing editable annotations 2024-07-02 14:11:40 +02:00
test_utils.mjs Disable link annotations during text selection 2024-07-23 10:42:34 +02:00
text_field_spec.mjs Remove terminal white spaces when extracting text from annotation appearances 2024-01-09 10:42:53 +01:00
text_layer_spec.mjs Disable link annotations during text selection 2024-07-23 10:42:34 +02:00
viewer_spec.mjs Merge pull request #18218 from nicolo-ribaudo/test-maxCanvasPixels 2024-06-19 16:47:09 +02:00