@tiptap/vue-2 3.0.0-beta.15 → 3.0.0-beta.16
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.
- package/dist/menus/index.cjs +10 -8
- package/dist/menus/index.cjs.map +1 -1
- package/dist/menus/index.js +10 -8
- package/dist/menus/index.js.map +1 -1
- package/package.json +7 -7
package/dist/menus/index.cjs
CHANGED
|
@@ -1671,6 +1671,14 @@ var BubbleMenuView = class {
|
|
|
1671
1671
|
this.dragstartHandler = () => {
|
|
1672
1672
|
this.hide();
|
|
1673
1673
|
};
|
|
1674
|
+
this.resizeHandler = () => {
|
|
1675
|
+
if (this.resizeDebounceTimer) {
|
|
1676
|
+
clearTimeout(this.resizeDebounceTimer);
|
|
1677
|
+
}
|
|
1678
|
+
this.resizeDebounceTimer = window.setTimeout(() => {
|
|
1679
|
+
this.updatePosition();
|
|
1680
|
+
}, this.resizeDelay);
|
|
1681
|
+
};
|
|
1674
1682
|
this.focusHandler = () => {
|
|
1675
1683
|
setTimeout(() => this.update(this.editor.view));
|
|
1676
1684
|
};
|
|
@@ -1731,14 +1739,7 @@ var BubbleMenuView = class {
|
|
|
1731
1739
|
this.view.dom.addEventListener("dragstart", this.dragstartHandler);
|
|
1732
1740
|
this.editor.on("focus", this.focusHandler);
|
|
1733
1741
|
this.editor.on("blur", this.blurHandler);
|
|
1734
|
-
window.addEventListener("resize",
|
|
1735
|
-
if (this.resizeDebounceTimer) {
|
|
1736
|
-
clearTimeout(this.resizeDebounceTimer);
|
|
1737
|
-
}
|
|
1738
|
-
this.resizeDebounceTimer = window.setTimeout(() => {
|
|
1739
|
-
this.updatePosition();
|
|
1740
|
-
}, this.resizeDelay);
|
|
1741
|
-
});
|
|
1742
|
+
window.addEventListener("resize", this.resizeHandler);
|
|
1742
1743
|
this.update(view, view.state);
|
|
1743
1744
|
if (this.getShouldShow()) {
|
|
1744
1745
|
this.show();
|
|
@@ -1876,6 +1877,7 @@ var BubbleMenuView = class {
|
|
|
1876
1877
|
this.hide();
|
|
1877
1878
|
this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: true });
|
|
1878
1879
|
this.view.dom.removeEventListener("dragstart", this.dragstartHandler);
|
|
1880
|
+
window.removeEventListener("resize", this.resizeHandler);
|
|
1879
1881
|
this.editor.off("focus", this.focusHandler);
|
|
1880
1882
|
this.editor.off("blur", this.blurHandler);
|
|
1881
1883
|
if (this.floatingUIOptions.onDestroy) {
|