@ohhwells/bridge 0.1.58 → 0.1.59

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.
package/dist/index.js CHANGED
@@ -7035,7 +7035,14 @@ function findClosestButtonLike(target) {
7035
7035
  function findButtonAtPoint(x, y, media) {
7036
7036
  const hits = Array.from(
7037
7037
  document.querySelectorAll(BUTTON_LIKE_SELECTOR)
7038
- ).filter((el) => containsPoint(el, x, y) && !(media && el.contains(media)));
7038
+ ).filter(
7039
+ (el) => containsPoint(el, x, y) && !(media && el.contains(media)) && // Bridge-injected chrome (e.g. MediaOverlay's own "Replace image" button) is never a
7040
+ // site button. Without this, once the media overlay renders its button lands right
7041
+ // under the cursor, gets detected as "a button on the media", and dismisses the very
7042
+ // overlay it belongs to — which removes the button, so the next hit-test finds nothing
7043
+ // and the overlay reappears. Flip-flops every tick: the "Replace image" button flashes.
7044
+ !el.closest("[data-ohw-bridge]")
7045
+ );
7039
7046
  if (hits.length === 0) return null;
7040
7047
  return hits.reduce((best, el) => best.contains(el) ? el : best);
7041
7048
  }
@@ -17108,7 +17115,7 @@ function OhhwellsBridge() {
17108
17115
  postToParent2({
17109
17116
  type: "ow:ready",
17110
17117
  version: "1",
17111
- bridgeVersion: "0.1.57",
17118
+ bridgeVersion: "0.1.58",
17112
17119
  path: pathname,
17113
17120
  nodes: collectEditableNodes(editContentRef.current),
17114
17121
  sections