This commit is contained in:
Nicolas Stepien 2011-12-10 23:18:26 +01:00
parent 41ef7244dd
commit cfccab22b0
3 changed files with 3 additions and 2 deletions

View File

@ -1688,7 +1688,7 @@
caretPos = ta.selectionStart;
ta.value = ta.value.slice(0, caretPos) + text + ta.value.slice(ta.selectionEnd, ta.value.length);
ta.focus();
return ta.selectionEnd = ta.selectionStart = caretPos + text.length;
return ta.selectionEnd = ta.selectionStart = caretPos + text.length + 1 * (engine === 'presto');
},
refresh: function() {
var m, newFile, oldFile, _ref;

View File

@ -1,6 +1,7 @@
master
- mayhem
enable autoposting when submitting a captcha while on cooldown
fix caret position when quoting on Opera
2.23.1
- mayhem

View File

@ -1327,7 +1327,7 @@ qr =
ta.value = ta.value.slice(0, caretPos) + text + ta.value.slice(ta.selectionEnd, ta.value.length)
ta.focus()
#move the caret to the end of the new quote
ta.selectionEnd = ta.selectionStart = caretPos + text.length
ta.selectionEnd = ta.selectionStart = caretPos + text.length + 1*(engine is 'presto')
refresh: ->
$('[name=sub]', qr.el).value = ''