GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
20.34k stars 3.84k forks source link

BUG: on fullscreen, color picker is hidden #5885

Closed vincepv closed 1 week ago

vincepv commented 2 weeks ago

GrapesJS version

What browser are you using?

Firefoxe 125.0.3 (64 bits)

Reproducible demo link

https://grapesjs.com/demo-newsletter-editor.html

Describe the bug

How to reproduce the bug?

  1. install latest version of grapejs
  2. click on fullscreen
  3. select a text or block with color property
  4. click on Open Style Manager
  5. click on color picker

grapesColor

You can reproduce here : https://grapesjs.com/demo-newsletter-editor.html

What is the expected behavior? on click, color picker should open.

What is the current behavior? color picker is always hidden in fullscreen.

Hypothesis I try to change CSS rules with z-index. I failed to solve the issue.

Stack of my front-end project "vue": "^3.4.15", "grapesjs": "^0.21.10", "grapesjs-mjml": "^1.0.5",

Code of Conduct

vincepv commented 2 weeks ago

Issue solved.

I find a solution.

When I init grapejs, I pass object config with colorPicker

const config = { container: '#editor', fromElement: true,

// other config options here

colorPicker: { appendTo: 'parent', offset: { top: 26, left: -166, }, }

}

artf commented 1 week ago

Thank @vincepv yeah there might be some conflicts with the fullscreen command and the default configuration of the color picker depending on how and where the editor container is rendered.

Probably, in most of cases, it would be enough to place the color picker in the same editor container to make them work properly.

grapesjs.init({
  container: '#gjs',
  colorPicker: { appendTo: '#gjs' },
 // ...
})