PKM-er / obsidian-editing-toolbar

An obsidian toolbar plugin, modified from the Cmenu plugin
Mozilla Public License 2.0
824 stars 29 forks source link

perf: enhance performance by removing nested event listeners. #154

Closed s4my closed 4 months ago

s4my commented 5 months ago

Before this commit we register two event listeners for keydown and wheel every time the mouseup event is triggered, which is really bad for performance.

cumany commented 5 months ago

Previously the event was restricted to work only in following mode, but now it works in all modes, e.g. when the position is top now the toolbar disappears when wheel scrolling down, which is not the expected behavior.

s4my commented 5 months ago

Sorry about that, I have updated the code to fix the issue, @cumany.

s4my commented 4 months ago

@cumany, are you waiting for me to do anything here?

cumany commented 4 months ago

Sorry for the late reply. I've been out for a few days. I will catch up with it soon.