Skip to content

fix: The Tooltip should not hide if it gets keyboard focus#25138

Merged
behowell merged 2 commits intomicrosoft:masterfrom
behowell:tooltip/onfocus-content
Oct 7, 2022
Merged

fix: The Tooltip should not hide if it gets keyboard focus#25138
behowell merged 2 commits intomicrosoft:masterfrom
behowell:tooltip/onfocus-content

Conversation

@behowell
Copy link
Contributor

@behowell behowell commented Oct 7, 2022

Current Behavior

If a tooltip contains a focusable item, it will hide when the user tries to interact with the focusable item (including clicking or tabbing to it).

New Behavior

Have the tooltip track if focus is inside, and don't hide if so.

Related Issue(s)

@fabricteam
Copy link
Collaborator

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-tooltip
Tooltip
41.566 kB
14.644 kB
41.648 kB
14.66 kB
82 B
16 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-alert
Alert
84.529 kB
21.171 kB
react-avatar
Avatar
48.828 kB
13.842 kB
react-avatar
AvatarGroup
14.95 kB
5.989 kB
react-avatar
AvatarGroupItem
68.796 kB
19.182 kB
react-components
react-components: Button, FluentProvider & webLightTheme
62.781 kB
17.574 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
189.227 kB
52.474 kB
react-components
react-components: FluentProvider & webLightTheme
33.4 kB
11.008 kB
react-persona
Persona
53.946 kB
15.225 kB
react-portal-compat
PortalCompatProvider
5.857 kB
1.978 kB
🤖 This report was generated against 223571d0a6317630a2c376d278c3e4a60c10e97a

@size-auditor
Copy link

size-auditor bot commented Oct 7, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 223571d0a6317630a2c376d278c3e4a60c10e97a (build)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 7, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ed1c0fe:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1294 1328 5000
Button mount 939 946 5000
FluentProvider mount 1517 1525 5000
FluentProviderWithTheme mount 581 582 10
FluentProviderWithTheme virtual-rerender 540 540 10
FluentProviderWithTheme virtual-rerender-with-unmount 574 579 10
MakeStyles mount 1982 1954 50000
SpinButton mount 2383 2344 5000

@behowell behowell marked this pull request as ready for review October 7, 2022 23:28
@behowell behowell requested a review from a team as a code owner October 7, 2022 23:28
@behowell behowell merged commit c0b200c into microsoft:master Oct 7, 2022
@behowell behowell deleted the tooltip/onfocus-content branch October 7, 2022 23:54
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Oct 10, 2022
* master: (23 commits)
  Revert "chore: screener-run workflow should report to PR (microsoft#25144)" (microsoft#25145)
  chore: screener-run workflow should report to PR (microsoft#25144)
  applying package updates
  fix: The Tooltip should not hide if it gets keyboard focus (microsoft#25138)
  fix: Tooltip should not hide if an element inside it gets focused (microsoft#25140)
  Create react-migration-v8-v9 with shims and stories (microsoft#25121)
  fix: CheckboxField to set a generated ID on the input, to match the label's htmlFor (microsoft#25079)
  feat: Overflow menu should be registered in overflowManager (microsoft#25091)
  fix: version-bump generator removes beachball disallowedChangeType config (microsoft#25130)
  fix: new overflow items should only be enqueued while observing (microsoft#25122)
  fix(script): allow runPublished call from CLI (microsoft#25127)
  feat: add vertical variation for toolbar (microsoft#24940)
  ProgressField implementation and stories (microsoft#25103)
  fix: Dropdown icon layout with no placeholder/value (microsoft#25049)
  chore: add a bundle size fixture (Button, Provider & theme) (microsoft#25113)
  feat: Adding subtle transition between states on Button components (microsoft#25106)
  Revert "chore: screener-run workflow should report to PR (microsoft#25096)" (microsoft#25115)
  chore: screener-run workflow should report to PR (microsoft#25096)
  fix(react-dialog): aria-* properties should be reassignable (microsoft#25092)
  fix(scripts): don't run publish if web-components are affected (microsoft#25095)
  ...
NotWoods pushed a commit to NotWoods/fluentui that referenced this pull request Nov 18, 2022
…#25138)

Have the tooltip track if focus is inside, and don't hide if so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: [Tooltip][React] Link in tooltip on mobile browsers doesn't work

4 participants