@bobfrankston/rmfmail 1.2.258 → 1.2.259

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.
@@ -3477,9 +3477,7 @@ function wireSpellcheck(editor2) {
3477
3477
  return NodeFilter.FILTER_ACCEPT;
3478
3478
  }
3479
3479
  });
3480
- const bodyRect = body.getBoundingClientRect();
3481
- const sx = body.scrollLeft;
3482
- const sy = body.scrollTop;
3480
+ const ovRect = ov.getBoundingClientRect();
3483
3481
  const frag = doc.createDocumentFragment();
3484
3482
  const wordRe = /[\p{L}][\p{L}'’]*/gu;
3485
3483
  for (let n = walker.nextNode(); n; n = walker.nextNode()) {
@@ -3506,7 +3504,7 @@ function wireSpellcheck(editor2) {
3506
3504
  if (rect.width < 1)
3507
3505
  continue;
3508
3506
  const sq = doc.createElement("div");
3509
- sq.style.cssText = `position:absolute;left:${(rect.left - bodyRect.left + sx).toFixed(1)}px;top:${(rect.bottom - bodyRect.top + sy - 3).toFixed(1)}px;width:${rect.width.toFixed(1)}px;height:3px;background:${WAVE} repeat-x left bottom;`;
3507
+ sq.style.cssText = `position:absolute;left:${(rect.left - ovRect.left).toFixed(1)}px;top:${(rect.bottom - ovRect.top - 3).toFixed(1)}px;width:${rect.width.toFixed(1)}px;height:3px;background:${WAVE} repeat-x left bottom;`;
3510
3508
  frag.appendChild(sq);
3511
3509
  }
3512
3510
  }
@@ -3704,7 +3702,8 @@ function initHarperLint(ed) {
3704
3702
  const ov = t.doc.createElement("div");
3705
3703
  ov.id = OVERLAY_ID2;
3706
3704
  ov.style.cssText = "position:absolute;left:0;top:0;width:0;height:0;overflow:visible;pointer-events:none;z-index:5;";
3707
- const win = t.doc.defaultView || window;
3705
+ host.appendChild(ov);
3706
+ const ovRect = ov.getBoundingClientRect();
3708
3707
  for (const p of placed) {
3709
3708
  let rects = [];
3710
3709
  try {
@@ -3716,11 +3715,10 @@ function initHarperLint(ed) {
3716
3715
  if (r.width < 2)
3717
3716
  continue;
3718
3717
  const u = t.doc.createElement("div");
3719
- u.style.cssText = `position:absolute;left:${r.left + win.scrollX}px;top:${r.bottom + win.scrollY - 2}px;width:${r.width}px;height:0;border-bottom:2px dotted rgba(66,133,244,0.9);pointer-events:none;`;
3718
+ u.style.cssText = `position:absolute;left:${(r.left - ovRect.left).toFixed(1)}px;top:${(r.bottom - ovRect.top - 2).toFixed(1)}px;width:${r.width.toFixed(1)}px;height:0;border-bottom:2px dotted rgba(66,133,244,0.9);pointer-events:none;`;
3720
3719
  ov.appendChild(u);
3721
3720
  }
3722
3721
  }
3723
- host.appendChild(ov);
3724
3722
  };
3725
3723
  const queuePaint = () => {
3726
3724
  if (paintQueued || disposed)