-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable link annotations during text selection #18481
Disable link annotations during text selection #18481
Conversation
0faa2c1
to
2b8cdce
Compare
@timvandermeij Could you also label this as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll trigger a run of the tests, but these are my comments based on a first look at the diff.
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/95a65e9243e5107/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/2b461cbf77de893/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/95a65e9243e5107/output.txt Total script time: 8.65 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/2b461cbf77de893/output.txt Total script time: 18.87 mins
|
6222dea
to
d2ac0f7
Compare
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 mozilla#18266
d2ac0f7
to
64a0e59
Compare
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/ce1a97100ab0be4/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/ce1a97100ab0be4/output.txt Total script time: 1.03 mins Published |
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/a53bd2105eb47b2/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/0f67645c2a5e003/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/0f67645c2a5e003/output.txt Total script time: 8.70 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/a53bd2105eb47b2/output.txt Total script time: 18.88 mins
|
Thank you for improving this! |
Commit message:
A lot of changes are just indentation: the
selectionchange
event handler has a single changed line, and the pre-existing tests none. I recommend reviewing with whitespace diff disabled.