diff options
author | Go MAEDA <maeda@farend.jp> | 2020-09-08 06:48:34 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-09-08 06:48:34 +0000 |
commit | 0c23c70edd36a4e1aa56fc3678181636680e1082 (patch) | |
tree | 436e33a371db32ce983c84bfbaaef98f8d561e35 /public | |
parent | 086a0e00b26de8740c01e2b861ea6ac80f15a581 (diff) | |
download | redmine-0c23c70edd36a4e1aa56fc3678181636680e1082.tar.gz redmine-0c23c70edd36a4e1aa56fc3678181636680e1082.zip |
Jump to end of line for ul, ol and quote when line is empty (#33958).
Patch by Felix Gliesche.
git-svn-id: http://svn.redmine.org/redmine/trunk@20009 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/jstoolbar/jstoolbar.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/public/javascripts/jstoolbar/jstoolbar.js b/public/javascripts/jstoolbar/jstoolbar.js index 0a2d454e8..376698f9a 100644 --- a/public/javascripts/jstoolbar/jstoolbar.js +++ b/public/javascripts/jstoolbar/jstoolbar.js @@ -338,7 +338,7 @@ jsToolBar.prototype = { } else if (typeof(this.textarea["setSelectionRange"]) != "undefined") { this.textarea.value = this.textarea.value.substring(0, start) + subst + this.textarea.value.substring(end); - if (sel) { + if (sel || (!prefix && start === end)) { this.textarea.setSelectionRange(start + subst.length, start + subst.length); } else { this.textarea.setSelectionRange(start + prefix.length, start + prefix.length); |