oliveryh / obsidian-emoji-toolbar

An Obsidian plugin to quickly add emojis into your notes
BSD 3-Clause "New" or "Revised" License
200 stars 10 forks source link

Bug w/ multiple windows- always adds emoji to main window active note, not secondary window #51

Open MarkMichon1 opened 1 year ago

MarkMichon1 commented 1 year ago

Hi there. I have a 2 monitor setup, and have 2 Obsidian windows (same vault/instance) open on each of them with different notes. The plugin works perfectly on the main app window when adding an emoji to a note there. However on the second window with another note is where I get the unexpected behavior.

The emoji selection window opens correctly over the 'right' window the hotkey is pressed. However, when selecting/clicking the emoji, it adds it to the note on the main window, where the blinking cursor last was before clicking the new secondary window. I'm not familiar with the code behind Obsidian, but I could imagine the fix being something like this: adding in some logic to add the emoji in to the active window, not just the active note within the main window.

Thank you, and good work with the plugin. I enjoy using it 🚀