From 17a80e13c02fc5b44ab6b09d345e02c269d1d2a7 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 7 Apr 2012 18:05:31 +0900 Subject: [PATCH] do it twice to prevent flicker --- aqt/editor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aqt/editor.py b/aqt/editor.py index a22b233aa..075b09f19 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -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