Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(FocusZone): Respect defaultTabbable element when FocusZone container gets focus #637

Merged
merged 5 commits into from
Dec 20, 2018

Conversation

sophieH29
Copy link
Contributor

defaultTabbableElement should be taken into account, when shouldFocusInnerElementWhenReceivedFocus is true and focus goes to FocusZone container.

Here is a decision tree:

  • Focus goes to FocusZone container (usually when it's an inner zone of other FocusZone) and shouldFocusInnerElementWhenReceivedFocus === "true"
  • If defaultTabbableElement is provided by client, try to fetch element and focus it
  • If no - focus first focusable element

@kuzhelov kuzhelov changed the title fix(FocusZone): Respect defaultTabbable element when FZ container receives focus fix(FocusZone): Respect defaultTabbable element when FocusZone container gets focus Dec 19, 2018
Copy link
Member

@miroslavstastny miroslavstastny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • rename this test in FocusZone-test.tsx:
it('should force focus to first focusable element when FocusZone container receives focus and shouldFocusFirstElementWhenReceivedFocus is set to "true"', () => {
  • update CHANGELOG

@sophieH29 sophieH29 merged commit faeef51 into master Dec 20, 2018
@sophieH29 sophieH29 deleted the fix/focus-zone-respect-defaultTabbableElement branch December 20, 2018 11:45
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.

None yet

3 participants