snowgoon88 / TW5-extendedit

Try to extend the editor of TiddlyWiki5
MIT License
38 stars 10 forks source link

Do not allow framed engine to propagate keydown events we have handled #28

Closed saqimtiaz closed 3 years ago

saqimtiaz commented 3 years ago

By default the framed engine (which is in an iframe) propagates all keyboard events to the parent document. This is problematic for events handled by the autocompletion. For example, using the ESC key to cancel the autocomplete popup also triggers the dialog to cancel editing the tiddler.

With this PR we override the default handleKeyDownEvent method of the framed engine, and only call it for events that we have not handled in the autocompletion.