Skip to content

How do we stop it from reloading when the window is unfocused (blur) #2058

Open

Description

@trusktr

Issue details

The app keeps refreshing even when I don't change any files. It refreshes when I unfocus the window. How can we stop it from doing that?

Steps to reproduce/test case

Please provide necessary steps for reproduction of this issue, or better the
reduced test case (without any external dependencies)
.

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ 2.27.11 ]
  • Node [ ]
  • Npm [ ]

Affected platforms

  • linux
  • windows
  • OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

If CLI, please paste the entire command below

{cli command here}

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

These are my options:

	{
		port: 54321,
		ui: {port: 54322},
		cors: true,
		watch: true,
		server: {baseDir: '.'},
	},

It keeps refreshing then I lose my state and have to re-do my actions to get back where I was.

Activity

  1. trusktr commented on Dec 15, 2025

    @trusktr
    Author

    So far the only documented solution is to set watch to false, to disable reloading altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions