diff options
| author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-07-12 12:07:38 -0400 |
|---|---|---|
| committer | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-07-12 12:07:38 -0400 |
| commit | 31041d7a5b2c3699518ebb33ccab016af0acd579 (patch) | |
| tree | 8d8651ef3bcf9e6fee0c55c598ec5c356dbcc05f /src/client/views/nodes/button/FontIconBox.tsx | |
| parent | 39cf91aadee5f448e1a7a0a07da9e769d6e242fa (diff) | |
| parent | 0906eab4135db844dc45a20d33f84e7439461c9b (diff) | |
merged master
Diffstat (limited to 'src/client/views/nodes/button/FontIconBox.tsx')
| -rw-r--r-- | src/client/views/nodes/button/FontIconBox.tsx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/client/views/nodes/button/FontIconBox.tsx b/src/client/views/nodes/button/FontIconBox.tsx index 85efc67a5..798759c01 100644 --- a/src/client/views/nodes/button/FontIconBox.tsx +++ b/src/client/views/nodes/button/FontIconBox.tsx @@ -344,12 +344,13 @@ export class FontIconBox extends DocComponent<ButtonProps>() { <div className="fontIconBox-label" style={{ color, backgroundColor }}> {this.label} </div>; - - const dropdownCaret = <div - className="menuButton-dropDown" - style={{ borderBottomRightRadius: this.dropdown ? 0 : undefined }}> - <FontAwesomeIcon icon={'caret-down'} color={color} size="sm" /> - </div>; + + // dropdown caret seems superfluous since clicking the color button does the same thing + // const dropdownCaret = <div + // className="menuButton-dropDown" + // style={{ borderBottomRightRadius: this.dropdown ? 0 : undefined }}> + // <FontAwesomeIcon icon={'caret-down'} color={color} size="sm" /> + // </div>; setTimeout(() => this.colorPicker(curColor)); // cause an update to the color picker rendered in MainView return ( <div className={`menuButton ${this.type + (FontIconBox.GetShowLabels() ? "Label" : "")} ${this.colorPickerClosed}`} @@ -367,7 +368,8 @@ export class FontIconBox extends DocComponent<ButtonProps>() { onClick={e => e.stopPropagation()}> {this.colorPicker(curColor)} </div> - <div className="dropbox-background" onClick={action((e) => { + <div className="dropbox-background" onPointerDown={action((e) => { + e.preventDefault(); e.stopPropagation(); this.colorPickerClosed = true; })} /> </div>} |
