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
22.38k stars 4.06k forks source link

Border Color Issue #1579

Closed YashPrince closed 5 years ago

YashPrince commented 5 years ago

@artf There is bug in the border color if you drag a button on the editor and paste color like rgb(255, 0, 0) in border color and select any other element in side the editor without changing any property and reselet the button then border color become rgb(255, and if we changes in any property of border then css breaks. Please check and fix it. Please provide any quick fix if there is any. Thanks in advance. grapejs grapeerror

loganvolkers commented 5 years ago

I can reproduce this on the demo website

Copy and pasting can trigger this error, but it looks like it has nothing to do with copy and paste and everything to do with whitespace.

Values that work:

Values that don't work:

As far as I can tell this affect the field for border-color, but not for background or font-color.

artf commented 5 years ago

everything to do with whitespace

Correct, it's just a poor parsing on composed types. We should split the value (eg. 1px solid rgba(255, 0, 0, 0)) by spaces (or even better propertyModel.get('separator'), which exists already) but taking care of functions

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.