mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 11:22:41 +01:00
editor: fix enter key keep line in view
This commit is contained in:
parent
04962bfe39
commit
b26548011c
1 changed files with 4 additions and 0 deletions
|
@ -2792,6 +2792,10 @@ function Ace2Inner() {
|
||||||
if (keyCode == 13 && browser.opera && (type == 'keypress')) {
|
if (keyCode == 13 && browser.opera && (type == 'keypress')) {
|
||||||
return; // This stops double enters in Opera but double Tabs still show on single tab keypress, adding keyCode == 9 to this doesn't help as the event is fired twice
|
return; // This stops double enters in Opera but double Tabs still show on single tab keypress, adding keyCode == 9 to this doesn't help as the event is fired twice
|
||||||
}
|
}
|
||||||
|
// Ensure caret is always on focus on enter key
|
||||||
|
if (keyCode === 13 && (type === 'keypress')) {
|
||||||
|
fixView();
|
||||||
|
}
|
||||||
let specialHandled = false;
|
let specialHandled = false;
|
||||||
const isTypeForSpecialKey = ((browser.safari || browser.chrome || browser.firefox) ? (type == 'keydown') : (type == 'keypress'));
|
const isTypeForSpecialKey = ((browser.safari || browser.chrome || browser.firefox) ? (type == 'keydown') : (type == 'keypress'));
|
||||||
const isTypeForCmdKey = ((browser.safari || browser.chrome || browser.firefox) ? (type == 'keydown') : (type == 'keypress'));
|
const isTypeForCmdKey = ((browser.safari || browser.chrome || browser.firefox) ? (type == 'keydown') : (type == 'keypress'));
|
||||||
|
|
Loading…
Reference in a new issue