add space to next

This commit is contained in:
Vick Scarlet
2021-10-06 02:21:18 +08:00
parent b65ef06acd
commit e91fab8a94
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -30,8 +30,8 @@ class App{
globalThis.onerror = (event, source, lineno, colno, error) => { globalThis.onerror = (event, source, lineno, colno, error) => {
this.hint(`[ERROR] at (${source}:${lineno}:${colno})\n\n${error?.stack||error||'unknow Error'}`, 'error'); this.hint(`[ERROR] at (${source}:${lineno}:${colno})\n\n${error?.stack||error||'unknow Error'}`, 'error');
} }
const keyDownCallback = (keyboardEvent) => { const keyDownCallback = ({which: w, keyCode: k}) => {
if (keyboardEvent.which === 13 || keyboardEvent.keyCode === 13) { if ( w === 13 || k === 13 || w === 32 || k === 32 ) {
const pressEnterFunc = this.#pages[this.#currentPage]?.pressEnter; const pressEnterFunc = this.#pages[this.#currentPage]?.pressEnter;
pressEnterFunc && typeof pressEnterFunc === 'function' && pressEnterFunc(); pressEnterFunc && typeof pressEnterFunc === 'function' && pressEnterFunc();
} }