From cf2de975a0c3d7f41b225bfa536fafb3e0cac842 Mon Sep 17 00:00:00 2001 From: Stephen Kaiser Date: Thu, 13 Sep 2018 14:45:27 -0700 Subject: [PATCH] fix(platform): wrap MSStream property detection as string to prevent Closure property renaming Prevents potential name collisions on window object, due to Closure compiler property renaming, that result in incorrect detection of iOS and cause tooltips to show on tap. Fixes #12223 --- src/cdk/platform/platform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdk/platform/platform.ts b/src/cdk/platform/platform.ts index a708f4de4577..6596c718a1a2 100755 --- a/src/cdk/platform/platform.ts +++ b/src/cdk/platform/platform.ts @@ -48,7 +48,7 @@ export class Platform { /** Whether the current platform is Apple iOS. */ IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && - !(window as any).MSStream; + !('MSStream' in window); /** Whether the current browser is Firefox. */ // It's difficult to detect the plain Gecko engine, because most of the browsers identify