Skip to content

Commit f202292

Browse files
fix: Formatting toolbar regression (#1630)
1 parent e673c82 commit f202292

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,9 @@ export class FormattingToolbarView implements PluginView {
140140
// Wrapping in a setTimeout gives enough time to wait for the blur event to
141141
// occur before updating the toolbar.
142142
const { state, composing } = view;
143-
const { selection } = state;
143+
const { doc, selection } = state;
144144
const isSame =
145-
oldState &&
146-
oldState.selection.from === state.selection.from &&
147-
oldState.selection.to === state.selection.to;
145+
oldState && oldState.doc.eq(doc) && oldState.selection.eq(selection);
148146

149147
if (composing || isSame) {
150148
return;

0 commit comments

Comments
 (0)