@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.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7108,7 +7108,14 @@ function findClosestButtonLike(target) {
|
|
|
7108
7108
|
function findButtonAtPoint(x, y, media) {
|
|
7109
7109
|
const hits = Array.from(
|
|
7110
7110
|
document.querySelectorAll(BUTTON_LIKE_SELECTOR)
|
|
7111
|
-
).filter(
|
|
7111
|
+
).filter(
|
|
7112
|
+
(el) => containsPoint(el, x, y) && !(media && el.contains(media)) && // Bridge-injected chrome (e.g. MediaOverlay's own "Replace image" button) is never a
|
|
7113
|
+
// site button. Without this, once the media overlay renders its button lands right
|
|
7114
|
+
// under the cursor, gets detected as "a button on the media", and dismisses the very
|
|
7115
|
+
// overlay it belongs to — which removes the button, so the next hit-test finds nothing
|
|
7116
|
+
// and the overlay reappears. Flip-flops every tick: the "Replace image" button flashes.
|
|
7117
|
+
!el.closest("[data-ohw-bridge]")
|
|
7118
|
+
);
|
|
7112
7119
|
if (hits.length === 0) return null;
|
|
7113
7120
|
return hits.reduce((best, el) => best.contains(el) ? el : best);
|
|
7114
7121
|
}
|
|
@@ -17175,7 +17182,7 @@ function OhhwellsBridge() {
|
|
|
17175
17182
|
postToParent2({
|
|
17176
17183
|
type: "ow:ready",
|
|
17177
17184
|
version: "1",
|
|
17178
|
-
bridgeVersion: "0.1.
|
|
17185
|
+
bridgeVersion: "0.1.58",
|
|
17179
17186
|
path: pathname,
|
|
17180
17187
|
nodes: collectEditableNodes(editContentRef.current),
|
|
17181
17188
|
sections
|