GrapesJS / GrapesJS/grapesjs

BUG: Angular Component as Custom Color Picker is only created once

Open
#4,704 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
26.2k
Forks
4.6k
Avg merge
2d 21h
Merged PRs (30d)
6

Description

### GrapesJS version

- [X] I confirm to use the latest version of GrapesJS

### What browser are you using?

Version 104.0.5112.101

### Reproducible demo link

https://codesandbox.io/s/awesome-dewdney-bwo5t1

### Describe the bug

**How to reproduce the bug?**
1. Add the Text block to the content of the editor
2. Open the StyleManager and expand the Decorations Sector
3. Notice the red placeholder text where normally the standard color picker is located (this text is a basic angular component)
4. Next, scroll down to the "Background" tab and add a new background
5. Notice again the red placeholder text
6. Click on the main content of the grapes content, so the styleManager switches to the settings of the body
7. Now click on the text block again and scroll down to the background tab and expand it
8. Notice how the placeholder text for the color attribute isn't there
9. If you look in the console of the browser you see that the angular component got destroyed when selecting another element, but never got created again

**What is the expected behavior?**
The Angular Component should be created/rendered again when opening the Background Tab.

**What is the current behavior?**
The Angular Component is destroyed when the Background Tab closes and we lose the ability to change the color until the whole grapes editor is opened again.

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.