Repository navigation
script: Implement CTRL-A to select all - #48025
Conversation
|
I have a few questions from writing this PR:
|
|
Hm, is selecting everything in Consider this: <!doctype html>
<head>
<style>/* This is selected in Chrome. */ * { display:block }</style>
</head>
<body bgcolor=white>
<script>
document.body.after(`This is selected in Chrome.`);
document.head.before(`This is selected in Chrome.`);
document.body.remove();
</script>
</body>All the text is selected when you hit Ctrl+A in Chrome even though none of it is in |
|
Everything in the document is indeed selected (if you remove the |
|
I moved logic into The example from @webbedspace works now |
|
🔨 Triggering try run (#34978546466) for Linux (WPT) |
|
|
|
🔨 Triggering try run (#34982604300) for Linux (WPT) |
e83d5a0 to
ab99f79
Compare
|
Test results for linux-wpt from try job (#34982604300): Flaky unexpected result (31)
Stable unexpected results that are known to be intermittent (10)
Stable unexpected results (35)
|
|
|
|
Turns out that the reason the tests were failing was relatively simple. Should be ready for re-review @mrobinson. Successful mach try run: https://github.com/dzfrias/servo/actions/runs/35038597427 |
What was the reason? |
|
I didn't read the tab sequential focusing code very carefully and forgot to include shift tab as a case in the shortcut matcher. Also, for the future: would it be preferred for me to squash/amend commits ahead of time? |
7ac0a8c to
d5c398f
Compare
|
Rebased on top of main and used the EditingContext implementation of select_all. |
25f28bd to
cbdffe1
Compare
Signed-off-by: Martin Robinson <[email protected]>
95bbc0e to
1e97d9d
Compare
There's no need to remove the test. When making edits to this PR I regressed it, which means it was a good test! The issue here is that the change in |
|
🔨 Triggering try run (#35752895867) for Linux (WPT) |
Ah, ok. I had the wrong impression because my work in this PR originally included changing the |
|
Test results for linux-wpt from try job (#35752895867): Flaky unexpected result (34)
Stable unexpected results that are known to be intermittent (11)
|
|
✨ Try run (#35752895867) succeeded. |
This change adds support for selecting all document text with the CTRL+A keyboard shortcut. Testing: two tests for CTRL-A. One testing the normal case, and the other testing when the body is removed from the DOM. Fixes: servo#47897 --------- Signed-off-by: Diego Frias <[email protected]> Signed-off-by: Martin Robinson <[email protected]> Co-authored-by: Martin Robinson <[email protected]>
This change adds support for selecting all document text with the CTRL+A keyboard shortcut. Testing: two tests for CTRL-A. One testing the normal case, and the other testing when the body is removed from the DOM. Fixes: servo#47897 --------- Signed-off-by: Diego Frias <[email protected]> Signed-off-by: Martin Robinson <[email protected]> Co-authored-by: Martin Robinson <[email protected]>
This change adds support for selecting all document text with the CTRL+A keyboard shortcut.
Testing: two tests for CTRL-A. One testing the normal case, and the other testing when the body is removed from the DOM.
Fixes: #47897