Component
Tooltip
Package version
3.0.1
@microsoft/fast-element version
?
Environment
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
npmPackages:
@fluentui/web-components: 3.0.1 => 3.0.1
Current Behavior
Tooltip and dropdown do not work together. When applying a tooltip to the dropdown the tooltip appears at the top-left of the screen.
I believe the issues is related to the way these two components handle css positioning anchoring. The dropdown will give itself an anchor-name in order to coordinate with the listbox popover:
|
this.style.setProperty('anchor-name', anchorName); |
However, the tooltip also needs a stable anchor name:
|
this.style.positionAnchor = anchorName; |
I believe the issue is that the tooltip initializes and captures the current anchor-name, then the dropdown changes it's anchor-name later.
Expected Behavior
The tooltip should be positioned next to the dropdown.
Reproduction
https://stackblitz.com/edit/vitejs-vite-ygrqqvpa
Steps to reproduce
Hover over the dropdown in the example, the tooltip appears in the top-left.
Are you reporting an Accessibility issue?
no
Suggested severity
High - No workaround
Products/sites affected
Fabric UX
Are you willing to submit a PR to fix?
yes
Validations
Component
Tooltip
Package version
3.0.1
@microsoft/fast-element version
?
Environment
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh npmPackages: @fluentui/web-components: 3.0.1 => 3.0.1Current Behavior
Tooltip and dropdown do not work together. When applying a tooltip to the dropdown the tooltip appears at the top-left of the screen.
I believe the issues is related to the way these two components handle css positioning anchoring. The dropdown will give itself an anchor-name in order to coordinate with the listbox popover:
fluentui/packages/web-components/src/dropdown/dropdown.base.ts
Line 257 in e803348
However, the tooltip also needs a stable anchor name:
fluentui/packages/web-components/src/tooltip/tooltip.ts
Line 111 in e803348
I believe the issue is that the tooltip initializes and captures the current anchor-name, then the dropdown changes it's anchor-name later.
Expected Behavior
The tooltip should be positioned next to the dropdown.
Reproduction
https://stackblitz.com/edit/vitejs-vite-ygrqqvpa
Steps to reproduce
Hover over the dropdown in the example, the tooltip appears in the top-left.
Are you reporting an Accessibility issue?
no
Suggested severity
High - No workaround
Products/sites affected
Fabric UX
Are you willing to submit a PR to fix?
yes
Validations