mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 10:36:02 +00:00
LibWeb: Partially implement <textarea>'s selectionStart and selectionEnd
This implementation pretends we never have a selection. GitHub relies on these values to know where to insert text corresponding to file uploads.
This commit is contained in:
parent
abc1be5b9e
commit
c0d594568d
Notes:
sideshowbarker
2024-07-16 22:11:09 +09:00
Author: https://github.com/trflynn89
Commit: c0d594568d
Pull-request: https://github.com/SerenityOS/serenity/pull/23586
5 changed files with 84 additions and 2 deletions
|
@ -0,0 +1,15 @@
|
|||
<textarea id="textarea"></textarea>
|
||||
<script src="include.js"></script>
|
||||
<script type="text/javascript">
|
||||
test(() => {
|
||||
let textarea = document.getElementById("textarea");
|
||||
textarea.focus();
|
||||
|
||||
println(`selectionStart: ${textarea.selectionStart}`);
|
||||
println(`selectionEnd: ${textarea.selectionEnd}`);
|
||||
|
||||
textarea.value = "Well hello friends";
|
||||
println(`selectionStart: ${textarea.selectionStart}`);
|
||||
println(`selectionEnd: ${textarea.selectionEnd}`);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue