Skip to content
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

[Vue] do not use button element in piwikHelper.modalConfirm() if it belongs to another nested modal #18619

Merged
merged 2 commits into from Jan 14, 2022

Conversation

diosmosis
Copy link
Member

Description:

piwikHelper.modalConfirm() uses every button w/ [role] even if it belongs to a nested modal. This doesn't appear to be an issue w/ angularjs code due to the timing in when angularjs processes templates/materialize creates modal content. With vue, the HTML appears to show up quicker.

To reproduce, check out matomo-org/tag-manager#404 and try to import a version. In the modal, you'll see "Yes"/"No" buttons which actually belong to the #confirmImportContainerVersion modal stored in the import version directive.

Fixed by checking for the number of .ui-confirm parents contained in the modal contents and skipping the button if it's more than 1.

Review

@diosmosis diosmosis added the Needs Review PRs that need a code review label Jan 14, 2022
@diosmosis diosmosis added this to the 4.7.0 milestone Jan 14, 2022
@sgiehl sgiehl merged commit 7f77fdf into 4.x-dev Jan 14, 2022
@sgiehl sgiehl deleted the vue-nested-modals-fix branch January 14, 2022 09:41
@justinvelluppillai justinvelluppillai added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants