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

View File

@ -1,6 +1,7 @@
master master
- mayhem - mayhem
enable autoposting when submitting a captcha while on cooldown enable autoposting when submitting a captcha while on cooldown
fix caret position when quoting on Opera
2.23.1 2.23.1
- mayhem - 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.value = ta.value.slice(0, caretPos) + text + ta.value.slice(ta.selectionEnd, ta.value.length)
ta.focus() ta.focus()
#move the caret to the end of the new quote #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: -> refresh: ->
$('[name=sub]', qr.el).value = '' $('[name=sub]', qr.el).value = ''