-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
fix(TransitionGroup): use offsetLeft and offsetTop instead of getBoundingClientRect to avoid transform scale affect animation #6108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
|
To be sure, the problem was fixed. |
re-use test case from 9733
WalkthroughTransitionGroup now records element positions using offsetLeft/offsetTop via a new Position interface, replacing DOMRect from getBoundingClientRect. Corresponding WeakMap types and recordPosition logic were updated. An e2e test was added to validate movement under a scaled container; the same test appears twice in the test file. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant TG as TransitionGroup
participant DOM as DOM Elements
U->>TG: Trigger reorder
TG->>DOM: Record old positions (left/top via offset*)
TG->>DOM: Patch/reorder VNodes
TG->>DOM: Record new positions (left/top via offset*)
TG->>DOM: Compute deltas and apply move class (.v-move)
Note over TG,DOM: Movement based on offsets (not getBoundingClientRect)
DOM-->>U: Play transition
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
Fix #6105
use offsetLeft and offsetTop replace Element.getBoundingClientRect
Summary by CodeRabbit
Bug Fixes
Tests