Skip to content

FocusTrapZone: Fix zero tabbable element scenarios#8274

Merged
JasonGore merged 4 commits intomicrosoft:masterfrom
JasonGore:jg/fix-ftz-no-tabbable
Mar 12, 2019
Merged

FocusTrapZone: Fix zero tabbable element scenarios#8274
JasonGore merged 4 commits intomicrosoft:masterfrom
JasonGore:jg/fix-ftz-no-tabbable

Conversation

@JasonGore
Copy link
Member

@JasonGore JasonGore commented Mar 12, 2019

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ npm run change

Description of changes

The last commit of #8216 actually broke one scenario: FocusTrapZone with 0 tabbable elements. This is because using position: fixed causes isElementVisible utility to fail since offsetParent is always null for the bumpers. This PR fixes zero tabbable scenarios by adding the data-is-visible attribute to the bumpers.

Focus areas to test

(optional)

Microsoft Reviewers: Open in CodeFlow

…ivs as visible with data-is-visible. Regression was caused by position: fixed, which makes offsetParent null for isElementVisible check.
@size-auditor
Copy link

size-auditor bot commented Mar 12, 2019

Bundle test Size (minified) Diff from master
Dialog 193.495 kB ExceedsBaseline     5 bytes
Callout 80.866 kB ExceedsBaseline     5 bytes
DatePicker 204.048 kB ExceedsBaseline     5 bytes
FocusTrapZone 33.354 kB ExceedsBaseline     5 bytes
Coachmark 88.92 kB ExceedsBaseline     5 bytes
HoverCard 89.799 kB ExceedsBaseline     5 bytes
Panel 191.844 kB ExceedsBaseline     5 bytes
Modal 68.921 kB ExceedsBaseline     5 bytes
Dropdown 220.601 kB ExceedsBaseline     5 bytes

ExceedsTolerance  Exceeds Tolerance     ExceedsBaseline  Exceeds Baseline     BelowBaseline  Below Baseline     1 kB = 1000 bytes

@JasonGore JasonGore merged commit 962ce87 into microsoft:master Mar 12, 2019
@msft-github-bot
Copy link
Contributor

🎉office-ui-fabric-react@v6.155.0 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants