mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
ace2_inner: Move variable declarations to appropriate scope
This commit is contained in:
parent
bf10e70f2e
commit
ca2e008e7b
1 changed files with 2 additions and 2 deletions
|
@ -2596,7 +2596,6 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
// tab keypress, adding keyCode == 9 to this doesn't help as the event is fired twice
|
// tab keypress, adding keyCode == 9 to this doesn't help as the event is fired twice
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let specialHandled = false;
|
|
||||||
|
|
||||||
const isTypeForSpecialKey = browser.safari || browser.chrome || browser.firefox
|
const isTypeForSpecialKey = browser.safari || browser.chrome || browser.firefox
|
||||||
? type === 'keydown' : type === 'keypress';
|
? type === 'keydown' : type === 'keypress';
|
||||||
|
@ -2619,6 +2618,7 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
} else if (type === 'keydown') {
|
} else if (type === 'keydown') {
|
||||||
outsideKeyDown(evt);
|
outsideKeyDown(evt);
|
||||||
}
|
}
|
||||||
|
let specialHandled = false;
|
||||||
if (!stopped) {
|
if (!stopped) {
|
||||||
const specialHandledInHook = hooks.callAll('aceKeyEvent', {
|
const specialHandledInHook = hooks.callAll('aceKeyEvent', {
|
||||||
callstack: currentCallStack,
|
callstack: currentCallStack,
|
||||||
|
@ -3543,10 +3543,10 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
const defaultLineHeight = parseInt(innerdocbodyStyles['line-height']);
|
const defaultLineHeight = parseInt(innerdocbodyStyles['line-height']);
|
||||||
|
|
||||||
let docLine = document.body.firstElementChild;
|
let docLine = document.body.firstElementChild;
|
||||||
let h = null;
|
|
||||||
|
|
||||||
// First loop to calculate the heights from doc body
|
// First loop to calculate the heights from doc body
|
||||||
while (docLine) {
|
while (docLine) {
|
||||||
|
let h;
|
||||||
const nextDocLine = docLine.nextElementSibling;
|
const nextDocLine = docLine.nextElementSibling;
|
||||||
if (nextDocLine) {
|
if (nextDocLine) {
|
||||||
if (lineOffsets.length === 0) {
|
if (lineOffsets.length === 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue