Skip to content

Dialog in Table closes when typing #3957

@mathieu-lessard

Description

@mathieu-lessard

Expected Behaviour

You can type in a Dialog in a Table.

Actual Behaviour

Table's Row with the typed value is focused.

Reproduce Scenario (including but not limited to)

  1. Create a Table with Height value
  2. Add Rows until the table has a scroll bar
  3. Add a Dialog to Rows
  4. Open a Dialog and type a letter which would focus outside of the currently viewable rows

Steps to Reproduce

https://codesandbox.io/s/react-spectrum-table-focus-yk8kq2?file=/src/App.tsx

Using the above link:

  1. Make the window's height small enough so only "John Doe" rows are visible.
  2. Click "Add" button"
  3. Type any letter (Not "J").

Platform and Version

Tested in @adobe/react-spectrum 3.20 - 3.24.1
On Mac - Safari, Chome, Firefox
On Windows 10 - Edge, Chrome, Firefox

Sample Code that illustrates the problem

https://codesandbox.io/s/react-spectrum-table-focus-yk8kq2?file=/src/App.tsx

Logs taken while reproducing problem

N/A

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions