bhl-forms 0.0.52 → 0.0.55

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.
@@ -9318,6 +9318,15 @@ function dbg$1() {
9318
9318
  return;
9319
9319
  console.debug(...arguments);
9320
9320
  }
9321
+ var getCoords$1 = (elem) => {
9322
+ var box2 = elem.getBoundingClientRect();
9323
+ return {
9324
+ top: box2.top + window.pageYOffset,
9325
+ right: box2.right + window.pageXOffset,
9326
+ bottom: box2.bottom + window.pageYOffset,
9327
+ left: box2.left + window.pageXOffset
9328
+ };
9329
+ };
9321
9330
  var postJSON = /* @__PURE__ */ function() {
9322
9331
  var _ref = _asyncToGenerator(function* (url3, data2) {
9323
9332
  dbg$1("Post to: " + url3);
@@ -10401,9 +10410,10 @@ function useSteps() {
10401
10410
  }
10402
10411
  if (el) {
10403
10412
  var __tempEl__ = document.createElement("input");
10413
+ var coords = getCoords$1(el);
10404
10414
  __tempEl__.style.position = "absolute";
10405
- __tempEl__.style.top = el.offsetTop + 7 + "px";
10406
- __tempEl__.style.left = el.offsetLeft + "px";
10415
+ __tempEl__.style.top = coords.top + 7 + "px";
10416
+ __tempEl__.style.left = coords.left + "px";
10407
10417
  __tempEl__.style.height = 0;
10408
10418
  __tempEl__.style.opacity = 0;
10409
10419
  document.body.appendChild(__tempEl__);
@@ -22299,6 +22309,7 @@ var init = () => {
22299
22309
  data2.onEnter = (callback) => (e2) => {
22300
22310
  if (e2.key === "Enter" || e2.keyCode === 13) {
22301
22311
  callback();
22312
+ e2.preventDefault();
22302
22313
  }
22303
22314
  };
22304
22315
  var app = createApp(_sfc_main$1, {