Skip to content

Commit

Permalink
fix(menu): crash when menu if forcedClosed
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Sep 25, 2018
1 parent b71b36c commit 22e15b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/src/components/menu/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ export class Menu implements ComponentInterface, MenuI {
this.lastOnEnd = detail.timeStamp;
this.animation
.onFinish(() => this.afterAnimation(shouldOpen), {
clearExistingCallbacks: true
clearExistingCallbacks: true,
oneTimeCallback: true
})
.progressEnd(shouldComplete, stepValue, realDur);
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/components/menu/test/basic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<ion-content>
<ion-list>
<ion-item>Open end Menu</ion-item>
<ion-item button onclick="openEnd()">Open end Menu</ion-item>
<ion-item>Close Menu</ion-item>
<ion-item>Close Menu</ion-item>
<ion-item>Close Menu</ion-item>
Expand Down Expand Up @@ -108,6 +108,7 @@
menu.open('start');
}
function openEnd() {
debugger;
console.log('Open end menu');
menu.open('end');
}
Expand Down

0 comments on commit 22e15b4

Please sign in to comment.