gd-bs 6.9.11 → 6.9.12

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.
@@ -62,6 +62,7 @@ var _FloatingUI = /** @class */ (function () {
62
62
  this._elContent = document.createElement("div");
63
63
  this._elContent.classList.add("bs");
64
64
  this._elContent.classList.add("floating-ui");
65
+ this._elContent.id = props.id || "fui-" + Date.now();
65
66
  this._elContent.appendChild(props.elContent);
66
67
  this._elContent.setAttribute("data-theme", this.getTheme(this._props.theme));
67
68
  (0, common_1.setClassNames)(this._elContent, this._props.className);
@@ -352,9 +353,11 @@ var _FloatingUI = /** @class */ (function () {
352
353
  _FloatingUI.prototype.hide = function () {
353
354
  // Remove it from the document
354
355
  this._elContent.classList.add("d-none");
355
- if (document.body.contains(this._elContent)) {
356
+ // Get the element
357
+ var elContent = document.getElementById(this._elContent.id);
358
+ if (elContent) {
356
359
  // Remove the element from the page
357
- document.body.removeChild(this._elContent);
360
+ document.body.removeChild(elContent);
358
361
  // Call the event
359
362
  this._props.onHide ? this._props.onHide() : null;
360
363
  }