mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-08 06:30:04 +00:00
fix: deterministic DOM widget clip-path for flaky screenshot test (#9400)
## Summary Fix deterministic DOM widget clip-path rendering to resolve the flaky "Can drag node" screenshot test. ## Root Cause `useDomClipping.updateClipPath()` schedules clip-path calculation in a `requestAnimationFrame`, but `DomWidget.vue`'s watcher reads `clippingStyle.value` synchronously before the RAF fires. The stale clip-path gets baked into `style.value` and never updated when the RAF completes, causing the textarea DOM widget to non-deterministically render in front of or behind the canvas-drawn node selection border. ## Fix - Extract `composeStyle()` function and add a dedicated watcher on `clippingStyle` that recomposes the final inline style whenever the RAF-deferred clip-path updates - Add `enableDomClipping` to the main watcher dependency array so toggling the clipping setting immediately recomposes the style - Add `moveMouseToEmptyArea()` call in the test as a secondary stabilizer against hover highlight non-determinism - Delete stale snapshot so CI regenerates it with correct clip-path behavior - Fixes #4658 --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 98 KiB |
Reference in New Issue
Block a user