diff --git a/packages/core/src/opendirector/application/motion_runtime/motion-runtime-core.js b/packages/core/src/opendirector/application/motion_runtime/motion-runtime-core.js index 98165fa77..dc3196fd7 100644 --- a/packages/core/src/opendirector/application/motion_runtime/motion-runtime-core.js +++ b/packages/core/src/opendirector/application/motion_runtime/motion-runtime-core.js @@ -1490,7 +1490,7 @@ const cs = getComputedStyle(el); let effOpacity = Number(cs.opacity); if (!Number.isFinite(effOpacity)) effOpacity = 1; - let hiddenByAncestor = cs.display === "none" || cs.visibility === "hidden"; + let hiddenByAncestor = cs.display === "none" || cs.visibility !== "visible"; let visL = r.left, visT = r.top, @@ -1502,7 +1502,7 @@ const pcs = getComputedStyle(cur); const pop = Number(pcs.opacity); if (Number.isFinite(pop)) effOpacity *= pop; - if (pcs.display === "none" || pcs.visibility === "hidden") hiddenByAncestor = true; + if (pcs.display === "none") hiddenByAncestor = true; const ov = (pcs.overflow || "") + " " + (pcs.overflowX || "") + " " + (pcs.overflowY || ""); const clips = cur === stage || /(?:hidden|clip|scroll|auto)/.test(ov); if (clips) { diff --git a/tests/test_motion_inspect_v2.py b/tests/test_motion_inspect_v2.py index e55921393..ecda096a0 100644 --- a/tests/test_motion_inspect_v2.py +++ b/tests/test_motion_inspect_v2.py @@ -610,6 +610,37 @@ def _require_chrome() -> None: pytest.skip("Local Chrome not available") +def test_chrome_inspect_visible_clip_under_hidden_ancestor(): + _require_chrome() + web = { + "version": 1, + "baseWidth": 640, + "baseHeight": 360, + "html": ( + '
' + '' + '