Skip to content

Commit 3fb8b7b

Browse files
authored
fix: only listten for left click on formatting toolbar (#1774)
1 parent 8f496a0 commit 3fb8b7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ export class FormattingToolbarView implements PluginView {
130130
};
131131

132132
viewMousedownHandler = (e: MouseEvent) => {
133-
if (!this.isElementWithinEditorWrapper(e.target as Node)) {
133+
if (
134+
!this.isElementWithinEditorWrapper(e.target as Node) ||
135+
e.button === 0
136+
) {
134137
this.preventShow = true;
135138
}
136139
};

0 commit comments

Comments
 (0)