You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trigger some change so that the page height is reduced and force the viewport to scroll upwards a little bit.
What is expected?
The existing items should stick to the container, instantly appear in the final position, without transitions.
What is actually happening?
The existing items jump out of the container because of the sudden change on vertical position and slowly move back to the expected position.
Internally, <transition-group> is using getBoundingClinetRect() to track the positions of transition items. This works fine when no page scroll is introduced. But when browsers force page scroll on certain situations, the container (and the rest of the page) flashed into the final position while transition items are stuck in the old position based on the viewport, which makes it look like they suddenly jump out of the document and start performing unexpected transitions.
Maybe we can provide some new prop on <transition-group>, say, origin: 'viewport' | 'document', to optionally calculate positions based on the canvas origin instead of the viewport.
F.Y.I.
When forced page scroll is triggered:
When not triggered:
The text was updated successfully, but these errors were encountered:
Version
2.5.16
Reproduction link
https://codesandbox.io/s/kxkmp9mov3
Steps to reproduce
<transition-group>
.What is expected?
The existing items should stick to the container, instantly appear in the final position, without transitions.
What is actually happening?
The existing items jump out of the container because of the sudden change on vertical position and slowly move back to the expected position.
Internally,
<transition-group>
is usinggetBoundingClinetRect()
to track the positions of transition items. This works fine when no page scroll is introduced. But when browsers force page scroll on certain situations, the container (and the rest of the page) flashed into the final position while transition items are stuck in the old position based on the viewport, which makes it look like they suddenly jump out of the document and start performing unexpected transitions.Maybe we can provide some new prop on
<transition-group>
, say,origin: 'viewport' | 'document'
, to optionally calculate positions based on the canvas origin instead of the viewport.F.Y.I.
When forced page scroll is triggered:
When not triggered:
The text was updated successfully, but these errors were encountered: