fix: clicking a select when editing a color token now keeps the modal open #2892
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.
Why does this PR exist?
Closes #2885
When editing a color token, specifically the Modify operations, when clicking outside either of the
Select
components - still within theDialog
- it would close the whole modal!What does this pull request do?
EditTokenFormModal
to be a true Dialog by reverting this line (nowmodal={true}
as per Radix's Dialog default prop)Select
contained in aDialog
) seems to dees the underlying layer unresponsive due topointer-events: none
remaining in the<body>
= Radix bug! This mitigates it as a temporary fix on theEditTokenFormModal.tsx
. Some thoughts:DropdownMenus
/Select
&Dialog
to the latest Radix UI versions - then they went for a temporary fix:pointer-events
to auto (Community suggestions: [Dialog] body pointer-events: none remains after closing radix-ui/primitives#1241 (comment) & [Dialog] body pointer-events: none remains after closing radix-ui/primitives#1241 (comment))Testing this change
+
) Modify to set an Operation or Space (see 2 Select components)clickingOutsideModifierSelectsClosesTheModal.mp4
clickingOutsideTheSelectModifiersDontCloseTheModal.mp4