Skip to content

Commit 895576a

Browse files
committed
refactor
1 parent ead0879 commit 895576a

File tree

1 file changed

+5
-5
lines changed
  • packages/devextreme/js/__internal/ui/html_editor/modules

1 file changed

+5
-5
lines changed

packages/devextreme/js/__internal/ui/html_editor/modules/m_toolbar.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,13 @@ if (Quill) {
138138
const isSilentMode = eventSource === SILENT_ACTION
139139
&& isEmptyObject(this.quill.getFormat());
140140

141-
this._updateHeaderFormatWidget();
142-
143141
if (!isSilentMode) {
144142
const isSelectionChanged = eventName === SELECTION_CHANGE_EVENT;
143+
145144
this._updateToolbar(isSelectionChanged);
146145
}
146+
147+
this._updateHeaderFormatWidget();
147148
});
148149
}
149150
}
@@ -675,15 +676,14 @@ if (Quill) {
675676
}
676677

677678
_updateHeaderFormatWidget() {
679+
const selection = this.quill.getSelection();
678680
const formatName = 'header';
679681
const formatWidget = this._toolbarWidgets.getByName(formatName);
680-
const selection = this.quill.getSelection();
681-
682+
const formats = this.quill.getFormat(selection);
682683
if (!selection || !formatWidget) {
683684
return;
684685
}
685686

686-
const formats = this.quill.getFormat(selection);
687687
this._markActiveFormatWidget(formatName, formatWidget, formats);
688688
}
689689

0 commit comments

Comments
 (0)