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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dialog): add focusTrapDisabled property for non-modal dialogs #11362
base: dev
Are you sure you want to change the base?
feat(dialog): add focusTrapDisabled property for non-modal dialogs #11362
Changes from 3 commits
0439c86
702b4c8
61cb7b2
3fd589b
5225520
99aa605
7e910f6
a82272d
aa64339
66736a4
f4a4a99
bdf7a80
cf808df
278464f
0e2ab22
826d93f
0c7a4f9
2873183
5c11de0
ee12e16
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
shouldn't it deactivate if not open?
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.
The logic needs to handle changes to
open
,modal
andfocusTrapDisabled
.open
is false => do nothingmodal
is true orfocusTrapDisabled
is false => activateFocusTrapfocusTrapDisabled
is true and modal is false => deactivateFocusTrapThere 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.
I think this hasn't been resolved yet.
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.
I think the onOpen/onClose handles the deactivation part. We may not need this check at all. We can probably remove this function and call
activateFocusTrap
in its placeThere 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.
Gotcha. Sounds like
focusTrapDisabled
is intended for use at "open" time. Maybe we can clarify this in the docs. cc @geospatialem @DitwanPThere 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.
Yeah, I think we handle that in multiple places.
onClose
takes care ofdeactivateFocusTrap
, and the rest happens infocusTrapDisabledOverride(): boolean { return !this.modal && this.focusTrapDisabled; }