You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of a sudden, the WebKit browsers (tested with Chrome) have problems with the cursor position when simulating a key-sequence on an input within in a child iframe.
E.g.: simulating the sequence "foo" and then simulating the sequence "bar" will produce "barfoo" because every simulation is executed at the beginning of the input. Even something like "{selectall}{rightarrow}bar" doesn't help. It still produces "barfoo".
Maybe there was some update on Webkit or Chrome which causes this.
For now, the workaround is to copy the value of the input, select all and then simulate the new sequence completely. For example:
var oldValue = $('#myInput').val(),
suffix = "append-me";
$outer($('#myInput')).simulate('key-sequence', {sequence: '{selectall}'+oldValue+suffix});