Skip to content

Virtualized grids scroll unnecessarily when restoring focus to item in view #8234

Open
@nwidynski

Description

@nwidynski

Provide a general summary of the issue here

Found while working on grid edit mode, but forgot to file so here it is.

🤔 Expected Behavior?

Virtualized grids should not scroll when restoring focus to item inside the view.

😯 Current Behavior

The grid scrolls the restored item to 0% when restoring from behind and to 100% or the original position when restoring from before.

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

https://reactspectrum.blob.core.windows.net/reactspectrum/dc79c493558c37a520b02f5a2d7c6dbe8caa8fed/storybook-19/index.html?path=/story/react-aria-components--virtualized-grid-list&providerSwitcher-express=false

  1. Focus Item 2
  2. Tab behind the collection
  3. Shift+Tab to Item 2 and observe scroll
  4. (optional) Shift+Tab before the collection
  5. (optional) Tab to Item 2 and observe another scroll

Version

latest

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

OSX

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions