Skip to content

Commit

Permalink
[Bug] Fixed color picker closure when selecting first custom palette …
Browse files Browse the repository at this point in the history
…value) (#1347)

Signed-off-by: Giuseppe Macri <macri.giuseppe@gmail.com>
  • Loading branch information
heshan0131 committed Dec 7, 2020
1 parent 7f3be27 commit 027985a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/side-panel/layer-panel/color-selector.js
Expand Up @@ -91,7 +91,7 @@ class ColorSelector extends Component {
node = createRef();

handleClickOutside = e => {
if (this.props.colorUI && this.props.colorUI.showSketcher) {
if (this.props.colorUI && Number.isInteger(this.props.colorUI.showSketcher)) {
// if sketcher is open, let sketch to close itself first
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/side-panel/layer-panel/custom-palette.js
Expand Up @@ -248,7 +248,7 @@ class CustomPalette extends Component {
e.stopPropagation();
}}
onChange={e => this._inputColorHex(index, e)}
id="input-layer-label"
id={`input-layer-label-${index}`}
/>
</StyledInlineInput>
<StyledTrash onClick={() => this._onColorDelete(index)}>
Expand Down

0 comments on commit 027985a

Please sign in to comment.