bhl-forms 0.0.52 → 0.0.53

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.
@@ -4675,6 +4675,15 @@ function dbg$1() {
4675
4675
  return;
4676
4676
  console.debug(...arguments);
4677
4677
  }
4678
+ const getCoords$1 = (elem) => {
4679
+ let box2 = elem.getBoundingClientRect();
4680
+ return {
4681
+ top: box2.top + window.pageYOffset,
4682
+ right: box2.right + window.pageXOffset,
4683
+ bottom: box2.bottom + window.pageYOffset,
4684
+ left: box2.left + window.pageXOffset
4685
+ };
4686
+ };
4678
4687
  const postJSON = (url3, data) => __async(this, null, function* () {
4679
4688
  dbg$1("Post to: " + url3);
4680
4689
  const raw2 = yield fetch(url3, {
@@ -5686,9 +5695,10 @@ function useSteps() {
5686
5695
  }
5687
5696
  if (el) {
5688
5697
  var __tempEl__ = document.createElement("input");
5698
+ var coords = getCoords$1(el);
5689
5699
  __tempEl__.style.position = "absolute";
5690
- __tempEl__.style.top = el.offsetTop + 7 + "px";
5691
- __tempEl__.style.left = el.offsetLeft + "px";
5700
+ __tempEl__.style.top = coords.top + 7 + "px";
5701
+ __tempEl__.style.left = coords.left + "px";
5692
5702
  __tempEl__.style.height = 0;
5693
5703
  __tempEl__.style.opacity = 0;
5694
5704
  document.body.appendChild(__tempEl__);