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

Navigation breaks when multiple tabs are open #522

Closed
marcvangend opened this issue Mar 19, 2015 · 9 comments
Closed

Navigation breaks when multiple tabs are open #522

marcvangend opened this issue Mar 19, 2015 · 9 comments
Labels

Comments

@marcvangend
Copy link

I'm running Gulp while doing front-end tasks to perform various tasks like compiling sass and run jshint. It also runs BrowserSync (2.3.1) in snippet mode, mainly to inject changed css and reload when templates have changed. On occasions I use the ghostMode feature to test multiple browsers at once.

Sometimes, when I open multiple tabs of my development site in my browser, it breaks navigation: I click a link in the page, but it only reloads the current page. Once I have closed all other tabs, it returns to its expected behavior.

I have tried to stop this problem using the BrowserSync options, for instance adding

    ghostMode: {
      clicks: false,
      forms: false,
      scroll: false
    },

but without succes.

Am I doing something wrong? Is there a configuration option I missed? Or is this a bug?

@shakyShane
Copy link
Contributor

Do you mean that clicking a link does not navigate to that page at al (as if browser sync blocked it)?

Or do you just mean that other browsers do not follow?

@bdukes
Copy link

bdukes commented Mar 21, 2015

I'm using Firefox on Windows, and seeing that clicking on a link reload the page, rather than navigating. Similarly, entering a URL into the address bar just reloads the same page, rather than navigating (seems related to #486); entering a URL into a new tab's address bar works fine. If I click on a link in Firefox, Chrome will follow the link, but Firefox will just reload. Likewise, if I click a link in Chrome, it follows the link fine, but Firefox reloads without navigating. In Firefox, if I click the link again after the page starts reloading and "BrowserSync Disconnected" shows, then I can sometimes get it to navigate correctly.

@shakyShane
Copy link
Contributor

try setting

reloadOnRestart: false

@bdukes
Copy link

bdukes commented Mar 21, 2015

That does appear to have fixed my issue. Thanks!

@marcvangend
Copy link
Author

I'll try that next Monday, first thing. Thanks!

@marcvangend
Copy link
Author

As far as I can see, that fixed it. Thanks!

@shakyShane
Copy link
Contributor

yeah sorry about that @marcvangend - I'm thinking having it set to false as the default now as this issue has arisen many times.

@marcvangend
Copy link
Author

That's okay, I'm glad you were available to help.

For my understanding: What behavior is that setting supposed to control? When would someone want to set it to true?

@shakyShane
Copy link
Contributor

@marcvangend When you restart BrowserSync from the command line, you may of changed properties or even changed files in your website - so when a reconnection happens, browsers are reloaded to create a fresh context

@shakyShane shakyShane added the bug label Apr 29, 2015
shakyShane pushed a commit that referenced this issue Apr 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants