Skip to content

fix: table resizing click stuck#10040

Merged
snowystinger merged 10 commits into
mainfrom
fix-table-resizing-stuck
Jun 26, 2026
Merged

fix: table resizing click stuck#10040
snowystinger merged 10 commits into
mainfrom
fix-table-resizing-stuck

Conversation

@snowystinger

@snowystinger snowystinger commented May 11, 2026

Copy link
Copy Markdown
Member

Closes #10032

What happened was that the cursor overlay we use to style the cursor with the e-w arrows against the entire screen was receiving the pointer events after it appeared in press start. This caused us to be stuck in the resizer mode because onPress was never called.

Now we delay until there is an actual movement before we show the cursor style overlay. This is fine because usually the cursor styles are already on the draggable item to indicate it can drag. After that, we only care to keep showing it globally so long as it's still being dragged and the mouse has gone off somewhere else. This doesn't affect other modalities.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Go to path=/story/react-aria-components-table--table-example-story or docs build from this PR react-aria.adobe.com/Table#column-resizing and click on a column resizer. It should not get stuck with the focus indication showing that we're actively in resize mode.

🧢 Your Project:

@snowystinger snowystinger added the small review Easy to review PR label May 11, 2026
@rspbot

rspbot commented May 11, 2026

Copy link
Copy Markdown

Comment on lines +297 to +301
},
onPressEnd: () => {
if (state.resizingColumn != null) {
endResize(item);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I noticed is that the resizing "divider" line now disappears as you drag the handle on mobile, doesn't seem to happen on main. Note that it doesn't cancel the resize event, it is only that the divider disappears

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm yeah, i am not 100% on this approach yet. But I hadn't found any bad behaviours yet, thanks for finding that. I'll revisit the approach again.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lemme know if you need help investigating, I tested on Android.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I'll let you know how i go tomorrow

@rspbot

rspbot commented Jun 25, 2026

Copy link
Copy Markdown

@snowystinger snowystinger added ready for review and removed small review Easy to review PR labels Jun 25, 2026
@rspbot

rspbot commented Jun 25, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Jun 25, 2026

Copy link
Copy Markdown

@snowystinger snowystinger added this pull request to the merge queue Jun 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2026
@snowystinger snowystinger enabled auto-merge June 26, 2026 01:59
@rspbot

rspbot commented Jun 26, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Jun 26, 2026

Copy link
Copy Markdown
## API Changes

@react-aria/table

/@react-aria/table:TableColumnResizeAria

 TableColumnResizeAria {
   inputProps: DOMAttributes
+  isMouseResizing: boolean
   isResizing: boolean
   resizerProps: DOMAttributes
 }

@snowystinger snowystinger added this pull request to the merge queue Jun 26, 2026
Merged via the queue into main with commit 6819cb4 Jun 26, 2026
30 checks passed
@snowystinger snowystinger deleted the fix-table-resizing-stuck branch June 26, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Table] Column resizer bug on click instead of hold

4 participants