Leaving the window (blur, hiding, or the App window becoming inactive) runs release(), which clears the idle timer that docks the mini mouse and never arms it again. Dragging the mini widget and switching windows before the idle time passed therefore left it over the picture until the next touch. The inactive handler now re-arms the existing park timer after releasing, as the widget's own blur handler already does. It is an effect event so it reads the current mode without resubscribing; resubscribing would run the cleanup's release() on every mode change and drop a drag in progress. The existing tucking test asserted that hiding leaves no dock timer, which is the defect; it now asserts the timer is re-armed and is cleared on disposal. The test harness injects useEffectEvent like the other hooks. Verified: the new blur test fails without the change and passes with it; tsc -b and the full vitest run (159 files, 2348 tests) pass.
5e373321c7
·
2026-11-25 13:03:31 +08:00
History