@phuong-tran-redoc/document-engine-angular 0.0.31 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4781,6 +4781,7 @@ class EditorBubbleMenuComponent {
|
|
|
4781
4781
|
currentAttributes = {};
|
|
4782
4782
|
cleanupSelection = null;
|
|
4783
4783
|
shouldShowImpl = null;
|
|
4784
|
+
viewReady = false;
|
|
4784
4785
|
keyToSignal = new Map();
|
|
4785
4786
|
forceOpen = { value: false };
|
|
4786
4787
|
documentClickHandler;
|
|
@@ -4816,6 +4817,7 @@ class EditorBubbleMenuComponent {
|
|
|
4816
4817
|
this.addDocumentClickHandler();
|
|
4817
4818
|
}
|
|
4818
4819
|
ngAfterViewInit() {
|
|
4820
|
+
this.viewReady = true;
|
|
4819
4821
|
// const bubbleElement = this.bubbleElement?.nativeElement;
|
|
4820
4822
|
// if (bubbleElement) {
|
|
4821
4823
|
// this.focusTrap.attach(bubbleElement);
|
|
@@ -4890,6 +4892,9 @@ class EditorBubbleMenuComponent {
|
|
|
4890
4892
|
* Handle when target mark/node becomes active
|
|
4891
4893
|
*/
|
|
4892
4894
|
handleActivate(attrs) {
|
|
4895
|
+
if (!this.viewReady) {
|
|
4896
|
+
return;
|
|
4897
|
+
}
|
|
4893
4898
|
this.currentAttributes = attrs;
|
|
4894
4899
|
// Select which view to show
|
|
4895
4900
|
const viewId = this.selectInitialView(attrs, false);
|
|
@@ -6184,9 +6189,8 @@ class TiptapEditorDirective {
|
|
|
6184
6189
|
this.renderer.setProperty(this.elRef.nativeElement, 'disabled', isDisabled);
|
|
6185
6190
|
}
|
|
6186
6191
|
handleChange = ({ editor, transaction }) => {
|
|
6187
|
-
if (!transaction.docChanged)
|
|
6192
|
+
if (!transaction.docChanged)
|
|
6188
6193
|
return;
|
|
6189
|
-
}
|
|
6190
6194
|
// Needed for ChangeDetectionStrategy.OnPush to get notified about changes
|
|
6191
6195
|
this.changeDetectorRef.markForCheck();
|
|
6192
6196
|
if (this.outputFormat === 'html') {
|