Skip to content

fix(animation): play method resolves when animation is stopped - #28264

Merged
liamdebeasi merged 2 commits into
mainfrom
animation-abort
Oct 9, 2023
Merged

fix(animation): play method resolves when animation is stopped#28264
liamdebeasi merged 2 commits into
mainfrom
animation-abort

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

Issue number: N/A


What is the current behavior?

When trying to fix #20092, I discovered that

was never resolving when the animation was aborted in
this.animation.stop();
. This can happen if menu.disabled is set to true mid-animation.

In order to fix the menu bug, I need this promise to resolve when the animation is stopped.

What is the new behavior?

  • The play method now correctly resolves when the animation is cancelled.

Does this introduce a breaking change?

  • Yes
  • No

Other information

The play method resolves when a particular run of the animation is finished. The stop method ensures that this run never finishes which is why I've chosen to have play resolve. Note that onFinish callbacks should not be fired because the animation run did not complete.

@github-actions github-actions Bot added the package: core @ionic/core package label Sep 29, 2023
@liamdebeasi liamdebeasi changed the title Animation abort fix(animation): play method resolves when animation is stopped Oct 2, 2023
@liamdebeasi
liamdebeasi marked this pull request as ready for review October 2, 2023 16:55
@liamdebeasi
liamdebeasi requested review from a team and brandyscarney and removed request for a team October 2, 2023 16:55
@liamdebeasi
liamdebeasi added this pull request to the merge queue Oct 9, 2023
Merged via the queue into main with commit e6031fb Oct 9, 2023
@liamdebeasi
liamdebeasi deleted the animation-abort branch October 9, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Menu freezes if closed and disabled while animation is in progress

2 participants