This works for inputs but apparently not textareas:
var t1 = Apperyio("mytextarea");
t1.focus();
This works for inputs but apparently not textareas:
var t1 = Apperyio("mytextarea");
t1.focus();
UPDATE: Now it's not working in inputs. So let me ask this: is this the correct command that should be used to set focus for both inputs and textareas, and if so, is it supposed to work after an alert() call and within an if block?
Hello Robert,
Could you please be more specific?
On what event handler do you run this code?
How do you test this?
Thank you Alena, but I cannot provide that right now. Can you just tell me if that is the correct set-focus code and if it is supposed to work after an alert() call and within an if block.
Hello Robert,
This code works for me:
Apperyio("mytextarea").focus();
Could you check errors in the browser's console?
Thank you Sergiy. The problem does in fact look like it's caused by alert()s . When an alert() appears either before or after the focus command, focus is lost on the target component (both inputs and textareas). I would consider this a bug.