Issue #2683💬 AnsweredOpened March 25, 2020by longdoan74210 reactions

When cancel Colorpicker, it set wrong value for component

Quick answerby longdoan7421

Hi @artf, After seeing around the colorpicker, I think the problem is that the spectrum doesn't have the same value as model when user changes input. So I attempted to sync the value of spectrum and model, and it could fix the issue. Here is my solution: What do you think about this? If it's ok, I could submit a PR. T...

Read full answer below ↓

Question

Are you using the latest release (older versions are NOT supported)? Yes.Are you facing the bug with your local copy of GrapesJS or with the current demo? Both of them.Steps to reproduce:Drag a component then change its background color from inputOpen color picker immediatelyThen click to outside color picker (anywhere except canvas)What is the expected behavior? Background color should keep remain.What happens instead? Background color change to previous color or #000000.Screencast

Answers (2)

longdoan7421March 25, 2020

Hi @artf, After seeing around the colorpicker, I think the problem is that the spectrum doesn't have the same value as model when user changes input. So I attempted to sync the value of spectrum and model, and it could fix the issue. Here is my solution: What do you think about this? If it's ok, I...

longdoan7421March 25, 2020

I found out that this bug also happen if you change the input with any value, then immediately open colorpick then cancel it by clicking outside (not canvas).

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.