mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 05:36:17 -08:00
Two behaviours relied on a side effect of the animations module: its renderer deferred every DOM removal to the end of the change-detection tick, so a destroy hook still saw its view attached. Without the module Angular detaches the view first, where scrollTop reads 0 and Chromium has already fired a focusout with no related target for the focused control. The first CI run of #1931 failed the Electron catalog-sorting round trip on every OS and the web player-controls keyboard focus return on exactly that. The catalog list now tracks the grid offset from captured scroll events and saves that when it is destroyed detached (a connected grid is still read live); the saved 0 that overwrote the click-time snapshot is gone. The player settings panel decides "focus was inside" in a microtask after a focusout without related target, which the close destroys the panel before, so the removal-induced event no longer cancels the focus return. Both specs detach the view first and fail on the old code; the UI guidelines record the rule for destroy hooks. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>