Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chrome tab reuse #1035

Merged
merged 2 commits into from
Nov 17, 2016
Merged

Fix chrome tab reuse #1035

merged 2 commits into from
Nov 17, 2016

Conversation

einarlove
Copy link
Contributor

@einarlove einarlove commented Nov 11, 2016

When you start the development server it open a tab with your preferred browser with the site your developing. The docs for react-dev-utils/openBrowser states:

Attempts to open the browser with a given URL.
On Mac OS X, attempts to reuse an existing Chrome tab via AppleScript.
Otherwise, falls back to opn behavior.

The reuse of tabs in Chrome does not work correctly because of a bug in the applescript which this PR provides a fix for. Additionally it now supports tab reuse even if you've navigated in your app with history API, and brings Chrome to the foreground focused after tab reuse.

@gaearon gaearon added this to the 0.8.0 milestone Nov 11, 2016
@fson
Copy link
Contributor

fson commented Nov 17, 2016

This works great, thank you!

@fson fson merged commit b9c9aed into facebook:master Nov 17, 2016
eXtreme added a commit to eXtreme/create-react-app that referenced this pull request Nov 18, 2016
* pull2:
  Support Yarn (facebook#898)
  Fix chrome tab reuse (facebook#1035)
  Remove unnecessary transform plugins for object spread to work (facebook#1052)
  Clears the usage of react-jsx-source & react-jsx-self (facebook#992)
  Update babel-present-env and use node: 'current' as target (facebook#1051)
  Remove redundant `function` from export statement (facebook#996)
  Add Gatsby to alternatives (facebook#995)
  Allow webpack 2 as peerDependency in react-dev-utils (facebook#963)
  Remove custom babel-loader cache dir config (facebook#983)
  Check for presence of folders before continuing eject. Closes facebook#939. (facebook#951)
  Fixes facebook#952 (facebook#953)
  Always build before deploying to gh-pages (facebook#959)
  Add collectCoverageFrom option to collect coverage on files without any tests. (facebook#961)
  Catch and noop call to open web browser. (facebook#964)
  Gently nudge users towards https by default (facebook#974)
  Enable compression on webpack-dev-server (facebook#966) (facebook#968)
  Add next.js to Alternatives
  Point people to npm Windows instructions
  Encourage people to try recent npm

# Conflicts:
#	packages/react-scripts/config/webpack.config.dev.js
#	packages/react-scripts/package.json
#	packages/react-scripts/utils/createJestConfig.js
@einarlove einarlove deleted the fix-chrome-tab-reuse branch November 18, 2016 11:59
jarlef pushed a commit to jarlef/create-react-app that referenced this pull request Nov 28, 2016
* Correctly checks site url to tab url in reuse check

* Bring chrome to foreground focused after tab reuse
alexdriaguine pushed a commit to alexdriaguine/create-react-app that referenced this pull request Jan 23, 2017
* Correctly checks site url to tab url in reuse check

* Bring chrome to foreground focused after tab reuse
randycoulman pushed a commit to CodingZeal/create-react-app that referenced this pull request May 8, 2017
* Correctly checks site url to tab url in reuse check

* Bring chrome to foreground focused after tab reuse
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants