aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-01-20 23:44:20 -0500
committerbobzel <zzzman@gmail.com>2021-01-20 23:44:20 -0500
commitc59c31d53c4e401cec77bfd160aede5dcfbe490e (patch)
tree7512d6772b0e03f9991ba2b0e4eda16a52b2eebd /src
parente369336c413a337e02afc027cc1aecdd76a496c5 (diff)
fixed text styleBrush
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/formattedText/RichTextMenu.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx
index 07439825f..9000018f4 100644
--- a/src/client/views/nodes/formattedText/RichTextMenu.tsx
+++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx
@@ -600,7 +600,7 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
createBrushButton() {
const self = this;
- function onBrushClick(e: React.PointerEvent) {
+ const onBrushClick = (e: React.MouseEvent) => {
e.preventDefault();
e.stopPropagation();
self.TextView.endUndoTypingBatch();
@@ -622,8 +622,7 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
//onPointerDown={onBrushClick}
const button = <Tooltip title={<div className="dash-tooltip">style brush</div>} placement="bottom">
-
- <button className="antimodeMenu-button" style={this.brushMarks?.size > 0 ? { backgroundColor: "121212" } : {}}>
+ <button className="antimodeMenu-button" onClick={onBrushClick} style={this.brushMarks?.size > 0 ? { backgroundColor: "121212" } : {}}>
<FontAwesomeIcon icon="paint-roller" size="lg" style={{ transitionProperty: "transform", transitionDuration: "0.1s", transform: `rotate(${this.brushMarks?.size > 0 ? 45 : 0}deg)` }} />
</button>
</Tooltip>;