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
<a-page> and <b-page> both implement the NeonSharedElementAnimatableBehavior behavior and they define a hero-animation with a sharedElements property.
Navigating between <a-page> and <b-page> will properly do the hero-animation.
<c-page> is a bit different and only implements NeonAnimatableBehavior and delegates the animation to a sub-element <c-page-child> which itself implements the NeonSharedElementAnimatableBehavior.
However when I try to navigate from <a-page> or <b-page> to <c-page> I get following error:
Couldnt play ( hero-animation ). DOMException: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.(…)
I tried to debug the issue and it seems to be a combination of a timing issue and the getBoundingRect() function on one of the hero elements returns 0 width and height, which leads to following keyframe: transform("translate(453px,199px) scale(Infinity,Infinity)") which causes the partial keyframe issue.
However this behavior changes when I put a breakpoint in the hero-animation behavior.
If I set the breakpoint right at this line, the call to shared.to.getBoundingClientRect() will return 0 height and width (see picture 1)
However if I set the breakpoint one line before and then step through, getBoundingClientRect() will return correct width and height values (see picture 2).
The behavior stays the same even when I specify explicit sizes for the hero image.
Browsers Affected
Chrome
Firefox
Safari 9
Safari 8
Safari 7
Edge
IE 11
IE 10
The text was updated successfully, but these errors were encountered:
Description
I have a somewhat weird bug.
I have following DOM structure:
<a-page>
and<b-page>
both implement theNeonSharedElementAnimatableBehavior
behavior and they define ahero-animation
with asharedElements
property.Navigating between
<a-page>
and<b-page>
will properly do thehero-animation
.<c-page>
is a bit different and only implementsNeonAnimatableBehavior
and delegates the animation to a sub-element<c-page-child>
which itself implements theNeonSharedElementAnimatableBehavior
.<c-page>
:However when I try to navigate from
<a-page>
or<b-page>
to<c-page>
I get following error:I tried to debug the issue and it seems to be a combination of a timing issue and the
getBoundingRect()
function on one of the hero elements returns 0 width and height, which leads to following keyframe:transform("translate(453px,199px) scale(Infinity,Infinity)")
which causes the partial keyframe issue.However this behavior changes when I put a breakpoint in the hero-animation behavior.
If I set the breakpoint right at this line, the call to
shared.to.getBoundingClientRect()
will return 0 height and width (see picture 1)However if I set the breakpoint one line before and then step through,
getBoundingClientRect()
will return correct width and height values (see picture 2).The behavior stays the same even when I specify explicit sizes for the hero image.
Browsers Affected
The text was updated successfully, but these errors were encountered: