This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
fix(FocusZone): fix last breaking changes and make improvements when using Chat #614
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sophieH29
commented
Dec 14, 2018
jurokapsiar
approved these changes
Dec 14, 2018
kohlikohl
previously requested changes
Dec 17, 2018
sophieH29
commented
Dec 20, 2018
@@ -36,8 +36,11 @@ const ChatBehavior: Accessibility = (props: any) => ({ | |||
}) | |||
|
|||
const getLastTabbableElement = (root: HTMLElement): HTMLElement => { | |||
const lastVisibleMessage = root.querySelector('[data-last-visible="true"]') as HTMLElement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavior will be moved in future
mnajdova
reviewed
Dec 20, 2018
mnajdova
approved these changes
Dec 20, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the changelog and you are good to merge!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes/improvements addressed to FocusZone:
chatBehavior
shouldResetActiveElementWhenTabFromZone
prop - when TAB fromFocusZone
, give possibility to resetactiveElement
. So when TAB back toFocusZone
,activeElement
will be set to initial value, not where we left before. This behavior important for particular cases, for e.g., when usingVirtualList
we should always TAB back to last visible messageactiveElement
fromdefaultTabbableElement
prop toupdateIndexes
method. Before it was incomponentDidMount
, which would not always work in an exact time when we expect (when usingVirtualList
items are rendered with delay after FocusZone'scomponentDidMount
was called). Using itupdateIndexes
method will assure that activeElement was initially set, so we can update tab indexes accordingly to it.TODO: