@cloudflare/ai-search-snippet 0.0.35 → 0.0.36

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.
@@ -3638,13 +3638,14 @@ ${se}`;
3638
3638
  overflow: document.body.style.overflow,
3639
3639
  position: document.body.style.position,
3640
3640
  top: document.body.style.top,
3641
- width: document.body.style.width
3642
- }, this.savedHtmlOverflow = document.documentElement.style.overflow, document.documentElement.style.overflow = "hidden", document.body.style.overflow = "hidden", document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.width = "100%";
3641
+ width: document.body.style.width,
3642
+ scrollbarGutter: document.body.style.scrollbarGutter
3643
+ }, this.savedHtmlOverflow = document.documentElement.style.overflow, document.body.style.scrollbarGutter = "stable", document.documentElement.style.overflow = "hidden", document.body.style.overflow = "hidden", document.body.style.position = "fixed", document.body.style.top = `-${e}px`, document.body.style.width = "100%";
3643
3644
  }
3644
3645
  unlockBodyScroll() {
3645
3646
  if (!this.savedBodyStyles) return;
3646
3647
  const e = Math.abs(Number.parseInt(document.body.style.top || "0", 10));
3647
- document.documentElement.style.overflow = this.savedHtmlOverflow || "", document.body.style.overflow = this.savedBodyStyles.overflow, document.body.style.position = this.savedBodyStyles.position, document.body.style.top = this.savedBodyStyles.top, document.body.style.width = this.savedBodyStyles.width, window.scrollTo(0, e), this.savedBodyStyles = null, this.savedHtmlOverflow = null;
3648
+ document.documentElement.style.overflow = this.savedHtmlOverflow || "", document.body.style.overflow = this.savedBodyStyles.overflow, document.body.style.position = this.savedBodyStyles.position, document.body.style.top = this.savedBodyStyles.top, document.body.style.width = this.savedBodyStyles.width, document.body.style.scrollbarGutter = this.savedBodyStyles.scrollbarGutter || "", window.scrollTo(0, e), this.savedBodyStyles = null, this.savedHtmlOverflow = null;
3648
3649
  }
3649
3650
  cleanup() {
3650
3651
  this.clearLoadingInterval(), this.currentSearchController && (this.currentSearchController.abort(), this.currentSearchController = null), this.handleGlobalKeydown && (document.removeEventListener("keydown", this.handleGlobalKeydown), this.handleGlobalKeydown = null), this.inputElement && (this.handleInputChange && this.inputElement.removeEventListener("input", this.handleInputChange), this.handleInputKeydown && this.inputElement.removeEventListener("keydown", this.handleInputKeydown)), this.backdrop && this.handleBackdropClick && this.backdrop.removeEventListener("click", this.handleBackdropClick), this.handleInputChange = null, this.handleInputKeydown = null, this.handleBackdropClick = null, this.client && this.client.cancelAllRequests();