LearnNewsExamplesServices
Frontmatter
id7311
titleFix MagicMoveText component cache issue causing jumping scroll
stateClosed
labels
bugno auto close
assigneestobiu
createdAtSep 30, 2025, 11:59 AM
updatedAtNov 8, 2025, 12:16 PM
githubUrlhttps://github.com/neomjs/neo/issues/7311
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 8, 2025, 12:16 PM

Fix MagicMoveText component cache issue causing jumping scroll

Closed v11.0.0 bugno auto close
tobiu
tobiu commented on Sep 30, 2025, 11:59 AM

As identified by external feedback, the MagicMoveText component exhibits a visual bug on the neomjs.com portal's home page. When the component cycles through its text, it can cause a jarring "jumping" scroll effect.

Root Cause Analysis

The component uses a measureCache to store character geometries for performance. When a card is hidden (e.g., via removeDom: true in a card layout) and then shown again, the component's mounted state changes, but the cache is not being properly invalidated for the new context. This causes it to briefly render with stale positional data from its previous state, creating the jump.

Acceptance Criteria

  1. Implement a mechanism to clear the measureCache within the MagicMoveText component when it is unmounted or hidden.
  2. The fix should be verified on the neomjs.com portal's home page.
  3. The "jumping" effect should be completely eliminated, resulting in a smooth transition when content changes.
tobiu assigned to @tobiu on Sep 30, 2025, 11:59 AM
tobiu added the bug label on Sep 30, 2025, 11:59 AM
tobiu added the no auto close label on Sep 30, 2025, 12:05 PM
tobiu referenced in commit 1133c16 - "#7311 ticket as md file" on Sep 30, 2025, 12:06 PM
tobiu referenced in commit 36b6366 - "Fix MagicMoveText component cache issue causing jumping scroll #7311" on Nov 8, 2025, 12:11 PM
tobiu closed this issue on Nov 8, 2025, 12:16 PM