mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
This implementation pretends we never have a selection. GitHub relies on these values to know where to insert text corresponding to file uploads.
16 lines
517 B
HTML
16 lines
517 B
HTML
<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>
|