From 85ac2356916610cd30fdd48967fb6cb729cf001f Mon Sep 17 00:00:00 2001 From: Alex Kotliarskyi Date: Fri, 19 Jun 2015 14:19:17 -0700 Subject: [PATCH] [ReactNative] Don't activate Chrome when debugger is already open Summary: Before this diff every time you reload in debug mode Chrome window is actiavated. Looks like that behaviour is pretty annoying. Fixes #689 @public Test Plan: ``` $ ./packager/launchChromeDevTools.applescript 'https://www.facebook.com/' ``` First time it opens a new tab and activates Chrome, running this again does not activate Chrome if the tab already exists. --- launchChromeDevTools.applescript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launchChromeDevTools.applescript b/launchChromeDevTools.applescript index 4b718f5b..a8390790 100755 --- a/launchChromeDevTools.applescript +++ b/launchChromeDevTools.applescript @@ -11,7 +11,6 @@ on run argv set theURL to item 1 of argv tell application "Chrome" - activate if (count every window) = 0 then make new window @@ -40,6 +39,7 @@ on run argv set theWindow's active tab index to theTabIndex else tell window 1 + activate make new tab with properties {URL:theURL} end tell end if