How to disable cross-device action mirroring functionality of BrowserSync? (GhostMode)

Faced same problem, you can simply set ghost mode to false in init options.

     browserSync.instance = browserSync.init({
      startPath: '/',
      ghostMode: false,
      server: server,
      browser: browser
     });

no need to change in default.config.js :)


Sorry to answer my own question, but I found the answer a few days later and since no one has answered this yet I thought I'd post my solution.

The problem we were encountering seems to be caused by a feature in BrowserSync called "GhostMode" which mirrors click and scroll actions, as well as several form actions, across devices. Disabling this is very simple: Look for your BrowserSync config file (for me it was at root/node_modules/browser-sync/lib/default.config.js) and open that. Search in that file for something similar to the following:

ghostMode: {
    clicks: true,
    scroll: true,
    forms: {
        submit: true,
        inputs: true,
        toggles: true
    }
},

and change it so that it says ghostMode: false,

This fixed our issue and hopefully this will help others if they encounter the same problem.


In case you use the QuickStart seed to initialize your project, the settings of BrowserSync can be configured using bs-config.json file at project's root folder.

My file contains the following:

{
  "server": {
    "baseDir": "src",
    "routes": {
      "/node_modules": "node_modules"
    }
  },
  "ghostMode": false
}