question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: Style Manager is inaccurate when using combined CSS selectors which contains "bout" and componentFirst = true

See original GitHub issue

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome 100

Reproducible demo link

https://jsfiddle.net/4fmd732c/3/

Describe the bug

How to reproduce the bug?

Given a) componentFirst is set to true b) An element has multiple classes c) CSS rule uses combined selector of multiple classes d) One of the classes contains the word “bout”

Then: Style Manager does not accurately display current styling

Navigate to linked JS Fiddle

  1. Select Div in editor
  2. In the Style Manager, expand “Decorations” and take note of background color

What is the expected behavior?

  • Style manager should indicate background is green

What is the current behavior? Style manager indicates background is white

  • If you change class name from “.bout” to “.out”, it works fine
  • If you change ComponentFirst to “false”, “.bout” and “.out” work fine

If is necessary to execute some code in order to reproduce the bug, paste it here below:

// your code here

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
barryrosscommented, May 6, 2022

@artf Awesome! Thank you. To use these updates, I guess I would just need to re-build the library locally with your changes until next release. I’ll give that a shot.

0reactions
barryrosscommented, May 12, 2022

Gotcha, thanks for letting me know what you’re thinking

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS selectors - CSS: Cascading Style Sheets - MDN Web Docs
Selects an element based on the value of its id attribute. There should be only one element with a given ID in a...
Read more >
Docs • Svelte
Complete documentation for Svelte.
Read more >
Initializing focus state in React: you might be doing it wrong
Initializing focus state in React: you might be doing it wrong. Have you ever written a component with internal state like hasFocus or...
Read more >
How to Locate Web Elements Using CSS Selector in Selenium?
So let's begin the discussion learning about what are the element locators in Selenium and why is it of such soaring importance. CSS...
Read more >
Router tutorial: tour of heroes - Angular
Including a route parameter (passing the Hero id while routing to the "Hero Detail"); Child routes (the Crisis Center has its own routes);...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found