From: Jakub Vrana Date: Fri, 19 Nov 2010 14:50:09 +0000 (+0100) Subject: Caret is at the end after setting the value X-Git-Tag: v3.2.0~138 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=fe2d55ac00f392df70055353cc91080bd5c3ecf3;p=adminer.git Caret is at the end after setting the value --- diff --git a/adminer/static/functions.js b/adminer/static/functions.js index b5450f6e..8ba351f1 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -337,7 +337,7 @@ function selectDblClick(td, event, text) { input.selectionEnd = pos; if (document.selection) { var range = document.selection.createRange(); - range.moveStart('character', pos); + range.moveEnd('character', -input.value.length + pos); range.select(); } }