From 2ef32417bd899a3695e7b61a44fa455730fdd6ff Mon Sep 17 00:00:00 2001 From: Sergey Matyunin Date: Wed, 19 Aug 2026 13:50:22 +0300 Subject: [PATCH] test: sample editor close glyph before removal Issue: #195 User-Visible: no --- demo/smoke_editor_tabs.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demo/smoke_editor_tabs.mjs b/demo/smoke_editor_tabs.mjs index 234149e2..77456d2e 100644 --- a/demo/smoke_editor_tabs.mjs +++ b/demo/smoke_editor_tabs.mjs @@ -190,6 +190,7 @@ const res = await page.evaluate(async () => { + parseFloat(style.marginLeft) + parseFloat(style.marginRight); const verticalFootprint = rect.height + parseFloat(style.marginTop) + parseFloat(style.marginBottom); + const glyphStays13 = style.getPropertyValue('--mdc-icon-size').trim() === '13px'; hit?.dispatchEvent(new MouseEvent('click', { bubbles: true, composed: true, @@ -199,7 +200,8 @@ const res = await page.evaluate(async () => { await settleMode(); tabCrossChecks.push({ target: rect.width >= 24 && rect.height >= 24, - glyph: style.getPropertyValue('--mdc-icon-size').trim() === '13px', + // Capture computed style before the click removes the active X from DOM. + glyph: glyphStays13, footprint: Math.abs(horizontalFootprint - 15) <= 0.1 && Math.abs(verticalFootprint - 13) <= 0.1, edgeHit: hit === cross,