Fix color picker fields not being editable when opened from a dialog - #8966
Open
Bouh wants to merge 3 commits into
Open
Fix color picker fields not being editable when opened from a dialog#8966Bouh wants to merge 3 commits into
Bouh wants to merge 3 commits into
Conversation
Dialogs trap the focus inside them: since the color picker is rendered in a `Popper` (portaled outside of the dialog), the dialog was continuously taking the focus back, making the hexadecimal and RGB fields impossible to click on or to type in. Render the picker inside the dialog container when there is one, so that it can keep the focus. Pickers displayed outside of a dialog (layers list, properties panel, events sheet) are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013T6UrohvVR77BsbfUXpfp4
The exact `.MuiDialog-container` selector was never matching anything: because themes are nested (see `FullThemeProvider`), Material UI appends a counter to its global class names (`MuiDialog-container-10242` for example). Match the class name by prefix instead, so that the picker is really rendered inside the dialog trapping the focus and its fields become editable.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dialogs trap the focus inside them: since the color picker is rendered in a
Popper(portaled outside of the dialog), the dialog was continuously takingthe focus back, making the hexadecimal and RGB fields impossible to click on
or to type in.
Render the picker inside the dialog container when there is one, so that it
can keep the focus. Pickers displayed outside of a dialog (layers list,
properties panel, events sheet) are unchanged.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_013T6UrohvVR77BsbfUXpfp4