Fevol / obsidian-translate

Translate text and entire notes in Obsidian
MIT License
103 stars 6 forks source link

fix: pushScope when in textarea #6

Closed kometenstaub closed 2 years ago

kometenstaub commented 2 years ago

When the textarea is active, mod-enter is pushed, when the mouse goes out of it, it gets removed.

My solution isn't pretty, but it makes sure that when another hotkey is assigned to mod-enter, that the textarea takes over that hotkey while it is focused/the mouse is in it.

Closes #4.

kometenstaub commented 2 years ago

It would probably be a good idea to check whether the html elements exist on which the event listeners get added.

Additionally, they could be added on a bigger area than the text area, if you prefer.

Fevol commented 2 years ago

Looks great! Will add those checks for the Elements, and do some additional clean-up and commenting. Thank you so much for your help!