Skip to content

color-picker: set color when clicking outside - #9154

Closed
mxmou wants to merge 1 commit into
ScratchAddons:masterfrom
mxmou:click-outside-hex
Closed

color-picker: set color when clicking outside#9154
mxmou wants to merge 1 commit into
ScratchAddons:masterfrom
mxmou:click-outside-hex

Conversation

@mxmou

@mxmou mxmou commented Aug 7, 2026

Copy link
Copy Markdown
Member

Resolves #5993

Changes

Fixes the color not updating when clicking outside the hex color input after editing it.

To update the color, the addon activates the eyedropper, then deactivates it after a timeout. But if the update was the result of a click, the click event would deactivate the eyedropper before the addon could do it. Reducing the timeout from 50ms to a single tick fixes the bug.

Tests

Tested on Edge and Firefox.

@mxmou mxmou self-assigned this Aug 7, 2026
@mxmou mxmou added scope: addon Related to one or multiple addons size: extra small Can be reviewed in a few minutes labels Aug 7, 2026
@mxmou

mxmou commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

I've decided to refactor the code so that it won't use the eyedropper hack at all.

@mxmou mxmou closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: addon Related to one or multiple addons size: extra small Can be reviewed in a few minutes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

color-picker bug

1 participant