phoenix_live_view 0.18.13 → 0.18.14

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.
@@ -2297,7 +2297,8 @@ var JS = {
2297
2297
  }
2298
2298
  let onStart = () => {
2299
2299
  this.addOrRemoveClasses(el, inStartClasses, outClasses.concat(outStartClasses).concat(outEndClasses));
2300
- dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = display || "block");
2300
+ let stickyDisplay = display || this.defaultDisplay(el);
2301
+ dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = stickyDisplay);
2301
2302
  window.requestAnimationFrame(() => {
2302
2303
  this.addOrRemoveClasses(el, inClasses, []);
2303
2304
  window.requestAnimationFrame(() => this.addOrRemoveClasses(el, inEndClasses, inStartClasses));
@@ -2319,7 +2320,8 @@ var JS = {
2319
2320
  } else {
2320
2321
  window.requestAnimationFrame(() => {
2321
2322
  el.dispatchEvent(new Event("phx:show-start"));
2322
- dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = display || "block");
2323
+ let stickyDisplay = display || this.defaultDisplay(el);
2324
+ dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = stickyDisplay);
2323
2325
  el.dispatchEvent(new Event("phx:show-end"));
2324
2326
  });
2325
2327
  }
@@ -2364,6 +2366,9 @@ var JS = {
2364
2366
  },
2365
2367
  filterToEls(sourceEl, { to }) {
2366
2368
  return to ? dom_default.all(document, to) : [sourceEl];
2369
+ },
2370
+ defaultDisplay(el) {
2371
+ return { tr: "table-row", td: "table-cell" }[el.tagName.toLowerCase()] || "block";
2367
2372
  }
2368
2373
  };
2369
2374
  var js_default = JS;