This repository was archived by the owner on Mar 4, 2020. It is now read-only.
fix(Popup): fix click outside when trigger is not defined#2202
Merged
layershifter merged 2 commits intomasterfrom Jan 3, 2020
Merged
fix(Popup): fix click outside when trigger is not defined#2202layershifter merged 2 commits intomasterfrom
layershifter merged 2 commits intomasterfrom
Conversation
Collaborator
mnajdova
reviewed
Jan 2, 2020
| const isInsideTriggerElement = | ||
| this.triggerRef.current && | ||
| !doesNodeContainClick(this.triggerRef.current, e, this.context.target) | ||
| doesNodeContainClick(this.triggerRef.current, e, this.context.target) |
Contributor
There was a problem hiding this comment.
Just an observation, this is not exactlly the negated condition. Is that expected? The negated would look like this:
const isInsideTriggerElement =
!this.triggerRef.current || doesNodeContainClick(this.triggerRef.current, e, this.context.target)
Just mentioning in case if this was done only for readability
Member
Author
There was a problem hiding this comment.
Yep, it's expected as to check that click was inside we need to have a trigger element and click should inside of it. And if click was isOutsidePopupElement and !isInsideTriggerElement we can close Popup. But agree, this conditions are a bit crazy.
mnajdova
approved these changes
Jan 2, 2020
silviuaavram
approved these changes
Jan 2, 2020
delprzemo
pushed a commit
to delprzemo/fluent-ui-react
that referenced
this pull request
Jan 5, 2020
delprzemo
pushed a commit
to delprzemo/fluent-ui-react
that referenced
this pull request
Jan 31, 2020
jurokapsiar
pushed a commit
that referenced
this pull request
Feb 9, 2020
#2208) * fix(AlertBehavior) add missing aria-describedby to AlertBehavior when type is different than warning/danger #2197 * Fix tests for alertBehavior aria-describedby attribute * Remove duplication of aria-describedby assignment in alert dismiss behavior * Fix test for aria-describedby in Alert behavior * Update changelog for #2202 * Fix changelog log for #2208 PR * Set proper PR id in CHANGELOG.md * Move CHANGELOG log into unreleased section
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
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.
This PR fixes a cases when clicks outside of
Popupwere not properly handled in controlled mode withouttriggerprop.