'Fix' the caret position when quoting on Opera. Changelog.
This commit is contained in:
parent
07ada39342
commit
4f8cfa82d8
@ -1570,6 +1570,9 @@
|
|||||||
ta.value = ta.value.slice(0, caretPos) + text + ta.value.slice(ta.selectionEnd);
|
ta.value = ta.value.slice(0, caretPos) + text + ta.value.slice(ta.selectionEnd);
|
||||||
ta.focus();
|
ta.focus();
|
||||||
range = caretPos + text.length;
|
range = caretPos + text.length;
|
||||||
|
if ($.engine === 'presto') {
|
||||||
|
range++;
|
||||||
|
}
|
||||||
ta.setSelectionRange(range, range);
|
ta.setSelectionRange(range, range);
|
||||||
e = d.createEvent('Event');
|
e = d.createEvent('Event');
|
||||||
e.initEvent('input', true, false);
|
e.initEvent('input', true, false);
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
master
|
master
|
||||||
|
- Mayhem
|
||||||
|
Opera fixes.
|
||||||
|
/f/ fixes.
|
||||||
|
|
||||||
2.32.1
|
2.32.1
|
||||||
- Mayhem
|
- Mayhem
|
||||||
|
|||||||
@ -1155,6 +1155,8 @@ QR =
|
|||||||
ta.focus()
|
ta.focus()
|
||||||
# Move the caret to the end of the new quote.
|
# Move the caret to the end of the new quote.
|
||||||
range = caretPos + text.length
|
range = caretPos + text.length
|
||||||
|
# XXX Opera counts newlines as double
|
||||||
|
range++ if $.engine is 'presto'
|
||||||
ta.setSelectionRange range, range
|
ta.setSelectionRange range, range
|
||||||
|
|
||||||
# Fire the 'input' event
|
# Fire the 'input' event
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user