We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e673c82 commit f202292Copy full SHA for f202292
packages/core/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts
@@ -140,11 +140,9 @@ export class FormattingToolbarView implements PluginView {
140
// Wrapping in a setTimeout gives enough time to wait for the blur event to
141
// occur before updating the toolbar.
142
const { state, composing } = view;
143
- const { selection } = state;
+ const { doc, selection } = state;
144
const isSame =
145
- oldState &&
146
- oldState.selection.from === state.selection.from &&
147
- oldState.selection.to === state.selection.to;
+ oldState && oldState.doc.eq(doc) && oldState.selection.eq(selection);
148
149
if (composing || isSame) {
150
return;
0 commit comments