mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-01 01:29:31 +08:00
fix(component): nested modal view-transition support (#8073)
<div class='graphite__hidden'>
<div>🎥 Video uploaded on Graphite:</div>
<a href="https://app.graphite.dev/media/video/LakojjjzZNf6ogjOVwKE/b8033923-8f08-4c72-96b6-d790fc0ff703.mp4">
<img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/LakojjjzZNf6ogjOVwKE/b8033923-8f08-4c72-96b6-d790fc0ff703.mp4">
</a>
</div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/b8033923-8f08-4c72-96b6-d790fc0ff703.mp4">CleanShot 2024-09-03 at 18.36.17.mp4</video>
This commit is contained in:
@@ -89,6 +89,11 @@ class ModalTransitionContainer extends HTMLElement {
|
||||
this.animationFrame = requestAnimationFrame(() => {
|
||||
if (typeof document.startViewTransition === 'function') {
|
||||
const nodes = this.pendingTransitionNodes;
|
||||
nodes.forEach(child => {
|
||||
if (child instanceof HTMLElement) {
|
||||
child.classList.add('vt-active');
|
||||
}
|
||||
});
|
||||
document.startViewTransition(() => {
|
||||
nodes.forEach(child => {
|
||||
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
||||
|
||||
Reference in New Issue
Block a user