mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
do it twice to prevent flicker
This commit is contained in:
parent
3828c43cd8
commit
17a80e13c0
1 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,8 @@ function onFocus(elem) {
|
|||
py.run("focus:" + currentField.id.substring(1));
|
||||
// don't adjust cursor on mouse clicks
|
||||
if (mouseDown) { return; }
|
||||
// do this twice so that there's no flicker on newer versions
|
||||
caretToEnd();
|
||||
// need to do this in a timeout for older qt versions
|
||||
setTimeout(function () { caretToEnd() }, 1);
|
||||
// scroll if bottom of element off the screen
|
||||
|
|
Loading…
Reference in a new issue