Skip to content

v1.3.1 — Fix focus stealing on embed reposition

Choose a tag to compare

@AyWutiansui AyWutiansui released this 18 Jun 11:36
· 20 commits to master since this release

Bug Fix

  • Focus stealing: Typing that causes the embedded OneNote window to reposition (e.g., pressing Enter shifts the embed down) no longer steals input focus from the Obsidian editor.

Technical changes

  • Narrowed MutationObserver to exclude characterData changes and added RAF debouncing — prevents keystrokes from triggering expensive reposition cycles
  • Added WS_EX_NOACTIVATE to reparented OneNote child window — prevents the embedded window from stealing input focus
  • Replaced HWND_TOP with SWP_NOZORDER on subsequent repositions — avoids activating the embedded window during scroll/typing
  • Added throttled focus watchdog (500ms cooldown) in reposition callback — restores editor focus if lost