diff --git a/aqt/editor.py b/aqt/editor.py index e7560fce8..a22b233aa 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -97,8 +97,8 @@ function onFocus(elem) { py.run("focus:" + currentField.id.substring(1)); // don't adjust cursor on mouse clicks if (mouseDown) { return; } - // move cursor - caretToEnd(); + // need to do this in a timeout for older qt versions + setTimeout(function () { caretToEnd() }, 1); // scroll if bottom of element off the screen function pos(obj) { var cur = 0;