From 66bbd24d8da47c2629a078bb0c4106dcb9b6c85c Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Mon, 5 Dec 2016 21:28:32 +0100 Subject: [PATCH] perf(ripple): prevents jank by using raf --- src/components/menu/menu.ts | 3 +-- src/components/tap-click/ripple.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/menu/menu.ts b/src/components/menu/menu.ts index fdb4d29f2fc..7e1868778fb 100644 --- a/src/components/menu/menu.ts +++ b/src/components/menu/menu.ts @@ -410,8 +410,7 @@ export class Menu { * @private */ setOpen(shouldOpen: boolean, animated: boolean = true): Promise { - // _isPrevented is used to prevent unwanted opening/closing after swiping open/close - // or swiping open the menu while pressing down on the MenuToggle button + // If the menu is disabled or it is currenly being animated, let's do nothing if ((shouldOpen === this.isOpen) || !this._isEnabled || this._isAnimating) { return Promise.resolve(this.isOpen); } diff --git a/src/components/tap-click/ripple.ts b/src/components/tap-click/ripple.ts index f13e5fed1bd..c767156a98c 100644 --- a/src/components/tap-click/ripple.ts +++ b/src/components/tap-click/ripple.ts @@ -15,7 +15,6 @@ export class RippleActivator implements ActivatorBase { constructor(app: App, config: Config) { this.highlight = new Activator(app, config); - this.highlight.activatedDelay = 0; } clickAction(ev: UIEvent, activatableEle: HTMLElement, startCoord: PointerCoordinates) {