aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/button/FontIconBox.tsx
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2022-07-06 13:40:45 -0700
committerGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2022-07-06 13:40:45 -0700
commitb476f81fbb7b7af32fdcc2fdd9fd1e2e2fc34014 (patch)
tree338610d3f33657b0ea940d3ca7fd77a66c573be2 /src/client/views/nodes/button/FontIconBox.tsx
parent5fa4c9f833f7aec92b1d6ab4c30c7cc5b753c80e (diff)
parent0906eab4135db844dc45a20d33f84e7439461c9b (diff)
Merge branch 'master' into geireann-eslint-prettier
Diffstat (limited to 'src/client/views/nodes/button/FontIconBox.tsx')
-rw-r--r--src/client/views/nodes/button/FontIconBox.tsx16
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 fa3029a98..28874220a 100644
--- a/src/client/views/nodes/button/FontIconBox.tsx
+++ b/src/client/views/nodes/button/FontIconBox.tsx
@@ -340,12 +340,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}`}
@@ -363,7 +364,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>}