-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Color picker handle issues #49267
Comments
Linking for visibility another issue with the color picker by moving the cursor outside the container. Don't know if this is related though. #47504 |
Could you specificy better what is the expected behaviour? Also note that the color picker is internally using the |
Sure. Currently the handle gets clipped like this: Ideally it remains visible: When dragging the handle, if the cursor exits the container then control is lost. Ideally the user shouldn't have to keep their cursor strictly inside handle.mp4 |
Thank you!
I believe that's something related to how we assign
Now I see what you mean. My suspicion is that the reason why the cursor doesn't move is because of the block editor canvas being embedded in a iframe. The iframe would capture the pointer events, and would therefore prevent those events from moving the handle. Out of curiosity, I tried interacting with the storybook example: as you can see, as far as the cursor stays within the Storybook demo canvas, the drag handle moves as expected. But as soon as my cursor hovers over the Storybook toolbar and sidebar (which are outside of the Storybook canvas' iframe), the drag handle stops following the cursor. color-picker-drag.mp4 |
Oh good catch. I guess that's going to make it quite tricky to fix? |
The iframe could indeed complicate things, although it looks like the main culript is a combination of Trying an approach in #54164 |
Description
color.picker.handle.mp4
Visually: it's strange that the handle is clipped when it's close to the edge of the picker.
Behaviourally: when the cursor is outside the picker the handle stops moving, and eventually seems to close the entire picker for no reason.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
Gutenberg trunk
WordPress 6.2
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: