- From: Kiet Ho via GitHub <noreply@w3.org>
- Date: Thu, 28 Aug 2025 18:47:26 +0000
- To: public-css-archive@w3.org
This [WPT test](https://github.com/web-platform-tests/wpt/blob/47beb4bcd05d135e935c871f8555b4901c38b783/css/css-anchor-position/position-try-switch-from-fixed-anchor.html) (`css/css-anchor-position/position-try-switch-from-fixed-anchor.html`) seems to imply that changing `display` to `none` should also invalidate the last successful position option ```html <script> waitForAtLeastOneFrame().then(() => { window.scrollTo(250, 100); // The initial option no longer fits. Switch to fallback. waitForAtLeastOneFrame().then(() => { window.scrollTo(0, 0); // The initial option would fit again, but so does the fallback. Redisplay // to move away from the fallback option. anchored.style.display = "none"; waitForAtLeastOneFrame().then(() => { anchored.style.display = "block"; takeScreenshot(); }); }); }); </script> ``` This sounds like Chrome saving the last successful position option in the element style, or some sort of data structure that goes away on `display: none`, so when `display` is changed to something else, the last successful position option isn't there anymore. Maybe we should amend the resolution to include `display`? -- GitHub Notification of comment by tuankiet65 Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12577#issuecomment-3234577050 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 28 August 2025 18:47:27 UTC