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.

switching to style manager causes permanent (black) border on selecting elements

See original GitHub issue

Using latest stable Grapes + Grapes preset webpage.

Steps to reproduce

  1. go to https://jsfiddle.net/szLp8h4n/101/
  2. select the text element
  3. deselect the text element
  4. notice the permanent black border appearing:
screen shot 2018-04-04 at 2 13 13 pm

The expected behavior is that there is no black border when deselecting the element.

Note that this behavior is fixed by removing the logic that automatically opens the style manager when selecting a component:

screen shot 2018-04-04 at 2 14 21 pm

Therefore there seems to be a bug when changing the active state of a view.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
xamdam777commented, Apr 28, 2018

@artf I think that this problem is only partially solved. Please, check this screencast, you will see a related rgb border bug in the current grapesjs demo https://screencast-o-matic.com/watch/cFf3DbbiN6

I have created a new issue here

0reactions
xamdam777commented, May 25, 2018

I got working a dirty workaround and this is my current best solution based on @tommedema suggestion.

Just remove the “border” property from the decoration tab and add border-top, bottom, right and left instead.

buildProps: ["opacity", "background-color", "border-radius", "box-shadow", "background", "border-top", "border-bottom", "border-left", "border-right"],

This will completely remove the bugged border property and add 4 new properties.

The bad part of this workaround is that you will need to customize the new border properties by hand:

5px solid rgb(220, 22, 22)

Something like that will appear in every border text field, so your users will not have a color picker.

Maybe I’ll try to code my own color picker for the borders. I am afraid that if I use the default grapesjs one, it can be hard to achieve and that crazy bug may come back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove black border effect around select element ...
Try setting the following in your CSS: select { outline: 0 !important; }. However, styling the select element is a notoriously wonky endeavor....
Read more >
Modifying selections in Photoshop Elements
Moving a selection border repositions just the border without altering the photo. Using any selection tool, click New Selection in the options ...
Read more >
border-style - CSS: Cascading Style Sheets - MDN Web Docs
Displays a border with an extruded appearance. It is the opposite of groove . inset. Displays a border that makes the element appear...
Read more >
User interface options | Docs
The element path shows the selected element and the parent elements. Clicking an element on the element path will select the element in...
Read more >
Styling in React: 5 ways to style React apps
Learn about styling React components with inline styling, styled-components, CSS modules, Tailwind CSS, and Sass and CSS style sheets.
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