File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1315,8 +1315,16 @@ export function TableGrid({
13151315 // trusting the check `goToMatch` made before its await.
13161316 if ( ! isStillAMatch ( match ) ) {
13171317 pendingMatchRef . current = null
1318- activeMatchRef . current = null
1319- cursorIsOnMatchRef . current = false
1318+ // Release the cursor only if this reveal still owns it. A pending reveal
1319+ // waits here for its row to load, and the user can start a newer jump in
1320+ // that window — which has already claimed the ref. Clearing it blindly
1321+ // would strand that newer jump with no identity to re-point from, which
1322+ // is the skip-on-next failure this guard exists to prevent.
1323+ const active = activeMatchRef . current
1324+ if ( active && active . rowId === match . rowId && active . column === match . column ) {
1325+ activeMatchRef . current = null
1326+ cursorIsOnMatchRef . current = false
1327+ }
13201328 return
13211329 }
13221330 const rowIndex = rows . findIndex ( ( r ) => r . id === match . rowId )
You can’t perform that action at this time.
0 commit comments