Fixes #12791 - Use a selector to only select the correct tax rate sel… #13643
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.
…ect element on the tax rule edit page, instead of all three selects on that page.
Description
See description on #12791 for more info.
Short summary: on the tax rule edit page in the backend, there are 3 elements which are selected with the default selector
section.mselect-list
:Only the first one should be selected, otherwise really weird things happen on that page where the other 2 elements somehow are getting involved with actions you perform on the first multiselect.
You can only reproduce this behavior when certain javascript code is being delayed a bit while executing, like sometimes happens on a production server where not all assets are cached yet in your browser.
The proposed fix is to use a more specific selector:
#tax_rate + section.mselect-list
which only selects the correct container following the Tax Rate multiselect.Would be nice if someone could do some rigorous testing, because I had very little time yet to test this fix properly.
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist