prefilled text in a textarea
Posted: Wed Sep 14, 2022 4:33 pm
The record format contains a textarea and a button in a css panel. Prior to exfmt, the textarea field is pre-filled with some text by the RPG program. When it displays on the screen, the textarea has focus and its text is selected. I'm not sure how to unselect the text so the cursor is positioned after the pre-filled text. The intent is for the user to enter additional comments after the pre-filled text.
I tried adding the following js in the textarea onfocus() event, but the text remained selected.
input = this;
if (input.setSelectionRange) {
window.getSelection().removeAllRanges();
}
I tried adding the following js in the textarea onfocus() event, but the text remained selected.
input = this;
if (input.setSelectionRange) {
window.getSelection().removeAllRanges();
}