Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
no
Reproduction
N/A
Bug Description
For context #27759 & #27762 (comment).
We have currently FluentProvider & targetDocument that are our SSOT to bind event handlers in multiple areas:
|
targetDocument?.addEventListener('keydown', onDocumentKeyDown, { |
|
// As this event is added at targeted document, |
|
// we need to capture the event to be sure keydown handling from tooltip happens first |
|
capture: true, |
|
}); |
|
element?.addEventListener('click', conditionalHandler, true); |
|
element?.addEventListener('touchstart', conditionalHandler, true); |
|
element?.addEventListener('contextmenu', conditionalHandler, true); |
|
targetDocument?.addEventListener('focusout', handleFocusOut, { passive: true }); |
|
return () => { |
|
targetDocument?.removeEventListener('focusout', handleFocusOut); |
|
}; |
Based on what will be passed to targetDocument (and what decision will be there) we need to decide how to handle these cases.
Logs
Requested priority
High
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
no
Reproduction
N/A
Bug Description
For context #27759 & #27762 (comment).
We have currently
FluentProvider&targetDocumentthat are our SSOT to bind event handlers in multiple areas:fluentui/packages/react-components/react-tooltip/src/components/Tooltip/useTooltip.tsx
Lines 134 to 138 in d17c31e
fluentui/packages/react-components/react-utilities/src/hooks/useOnClickOutside.ts
Lines 76 to 78 in d17c31e
fluentui/packages/react-components/react-tree/src/components/TreeItem/useTreeItem.tsx
Lines 172 to 175 in d17c31e
Based on what will be passed to
targetDocument(and what decision will be there) we need to decide how to handle these cases.Logs
Requested priority
High
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations