zolrath / obsidian-auto-link-title

Automatically fetch the titles of pasted links
MIT License
443 stars 62 forks source link

Fix: check `event.defaultPrevented` before handling events to avoid conflicts with other plugins #106

Closed RyotaUshio closed 7 months ago

RyotaUshio commented 7 months ago

Hi, thank you for maintaining this plugin which is important for the community!

As stated in the developer documentation, a community plugin has to check event.defaultPrevented before handling editor-paste and editor-drop events to see if other plugins already handle the event.

So I added the two lines according to this. This change will fix conflicts with other plugins such as https://github.com/RyotaUshio/obsidian-advanced-external-links (sorry this is my plugin).

zolrath commented 7 months ago

Makes sense, thanks!