-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
BugFix 1302 undefined name #1336
Conversation
This reverts commit def0f08.
src/components/modules/ui.ts
Outdated
* currentBlock !=undefined | ||
* Ignore when KeyDown Element is null | ||
*/ | ||
const keyDownOnEditor = (event.target as HTMLElement).closest(`.${this.CSS.editorWrapper}`) || currentBlock != undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const keyDownOnEditor = (event.target as HTMLElement).closest(`.${this.CSS.editorWrapper}`) || currentBlock != undefined; | |
const keyDownOnEditor = (event.target as HTMLElement).closest(`.${this.CSS.editorWrapper}`) || currentBlock !== undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/components/modules/ui.ts
Outdated
* currentBlock !=undefined | ||
* Ignore when KeyDown Element is null | ||
*/ | ||
const keyDownOnEditor = (event.target as HTMLElement).closest(`.${this.CSS.editorWrapper}`) || currentBlock != undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move the currentBlock !== undefined
statement to the separate variable and describe this case (why it is counts as keydown on editor)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/** | ||
* Transfer event when currentBlock defined and keyDownOnEditor is null | ||
*/ | ||
if(currentBlock!== undefined && keyDownOnEditor===null){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(currentBlock!== undefined && keyDownOnEditor===null){ | |
if(currentBlock !== undefined && keyDownOnEditor === null){ |
*/ | ||
if(currentBlock!== undefined && keyDownOnEditor===null){ | ||
this.Editor.BlockEvents.keydown(event); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return; | |
return; |
Resolve #1302
Remaining: