mgmeyers / obsidian-kanban

Create markdown-backed Kanban boards in Obsidian.
https://publish.obsidian.md/kanban/
GNU General Public License v3.0
3k stars 173 forks source link

[Bug]: Slow/erratic edit behavior when main window isn't visible #964

Closed pjeby closed 1 month ago

pjeby commented 1 month ago

Describe the bug

When working with a Kanban in a popout window, editing a card (or ending edit of it) often delays for an extended period with a blank card, if the main Obsidian window is not visible.

Expected Behavior

It should be as responsive as it is when the main window is visible

Steps to reproduce

  1. Open a kanban in a popout window
  2. Minimize the main window (or hide it via maximizing a window in front of it)
  3. Try to edit a card (or end editing the card) - there will be a noticeable delay compared to when the main window is visible

The delay is erratic, lasting from a fraction of a second to several seconds.

Relevant errors (if available)

No response

Operating system

Windows

mgmeyers commented 1 month ago

It looks like preact added some setTimeouts since the last time I updated that were causing issues. I added a build step to try and replace these with activeWindow.setTimeout. Seems to work well in my testing but let me know if you run into any issues.

pjeby commented 1 month ago

Works great! Thanks.