microsoft / fast

The adaptive interface system for modern web experiences.
https://www.fast.design
Other
9.24k stars 590 forks source link

fix: port data grid nav fix to fast-element-1 #6905

Closed scomea closed 1 week ago

scomea commented 7 months ago

📖 Description

Keyboard events emitted from a data grid cell when a cell's internal navigation is active can incorrectly move focus in the parent grid. Rather than rely on authors to intercept these events the cell component can prevent their propagation.

Additionally, this change adds

a simple 'defaultCellFocusTargetCallback` function that authors can use to move focus to the first element of a cell. an example of a grid with cells with internal focus targets and internal nav queue fixes code that detects the current active element to work within shadow doms

This is a port of this pr: https://github.com/microsoft/fast/pull/6754/files

🎫 Issues

Requested back port of a bug fix.

👩‍💻 Reviewer Notes

📑 Test Plan

✅ Checklist

General

Component-specific

⏭ Next Steps

janechu commented 1 week ago

@scomea is this still needed? If so please move it out of draft status and we can review. We're looking to close out work on archived branches.

scomea commented 1 week ago

@scomea is this still needed? If so please move it out of draft status and we can review. We're looking to close out work on archived branches.

I believe this was a port requested by Blazor that ended up sitting idle. I'd defer to @chrisdholt as to whether it is relevant.

janechu commented 1 week ago

Seems that the blazor implementation relies on fluent ui web components which is not using the deprecated foundation package, so closing this until I hear otherwise :)