after Re-setting the html field config from read-only to non-read-only results to a cursor reset
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2024 04:35 AM
Hello team,
After Re-setting the Html field config from read-only to non-read-only from on-load client script, results to a cursor reset to the initial position.
This issue is also reproducible in the PDI instance.
This issue is occurring when we use the setTimeout function in client script.
Why key-up event breaking in this scenario for html field?
Client script : function onLoad() {
g_form.setReadOnly("demo_html", true);
g_form.setDisplay("demo_html", false);
setTimeout(function() {
g_form.setDisplay("demo_html", true);
g_form.setReadonly("demo_html", false);
}, 5000);
}
This function is on "demo_html" text field. Now when we open the form in portal side , and when we type something on this field, cursor goes to left side .....even if we think of this of re rendering , it should happen only once onload, but even when we write this code in onChange still the issue is happening. I tried to open the form from the platform the issue is not happening. It is happening only on the portal. We also tried to remove the setTimeout function and the issue is not happening. Now I jus want to understand how is readOnly() function is effecting the cursor position ?