@tiptap/vue-2 3.0.0-beta.15 → 3.0.0-beta.17

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.
@@ -1644,6 +1644,14 @@ var BubbleMenuView = class {
1644
1644
  this.dragstartHandler = () => {
1645
1645
  this.hide();
1646
1646
  };
1647
+ this.resizeHandler = () => {
1648
+ if (this.resizeDebounceTimer) {
1649
+ clearTimeout(this.resizeDebounceTimer);
1650
+ }
1651
+ this.resizeDebounceTimer = window.setTimeout(() => {
1652
+ this.updatePosition();
1653
+ }, this.resizeDelay);
1654
+ };
1647
1655
  this.focusHandler = () => {
1648
1656
  setTimeout(() => this.update(this.editor.view));
1649
1657
  };
@@ -1704,14 +1712,7 @@ var BubbleMenuView = class {
1704
1712
  this.view.dom.addEventListener("dragstart", this.dragstartHandler);
1705
1713
  this.editor.on("focus", this.focusHandler);
1706
1714
  this.editor.on("blur", this.blurHandler);
1707
- window.addEventListener("resize", () => {
1708
- if (this.resizeDebounceTimer) {
1709
- clearTimeout(this.resizeDebounceTimer);
1710
- }
1711
- this.resizeDebounceTimer = window.setTimeout(() => {
1712
- this.updatePosition();
1713
- }, this.resizeDelay);
1714
- });
1715
+ window.addEventListener("resize", this.resizeHandler);
1715
1716
  this.update(view, view.state);
1716
1717
  if (this.getShouldShow()) {
1717
1718
  this.show();
@@ -1849,6 +1850,7 @@ var BubbleMenuView = class {
1849
1850
  this.hide();
1850
1851
  this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: true });
1851
1852
  this.view.dom.removeEventListener("dragstart", this.dragstartHandler);
1853
+ window.removeEventListener("resize", this.resizeHandler);
1852
1854
  this.editor.off("focus", this.focusHandler);
1853
1855
  this.editor.off("blur", this.blurHandler);
1854
1856
  if (this.floatingUIOptions.onDestroy) {