Skip to content

Commit

Permalink
fix: catch enter key for whole popup except for math-field
Browse files Browse the repository at this point in the history
math-field should handle enter itself by `change` event
  • Loading branch information
AllanChain committed Aug 25, 2023
1 parent 197c637 commit 6bd10b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function openPopup(
await insertLaTeX()
})
popupContent.addEventListener('keydown', async (event) => {
if (event.key === 'Enter') {
if (event.target !== mfe && event.key === 'Enter') {
await insertLaTeX()
}
// avoid Logseq catching keydown, e.g. `(`
Expand Down

0 comments on commit 6bd10b5

Please sign in to comment.