mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
c0d594568d
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>
|