Browser-sync: ghostMode click disabled and client logic still occurs

Created on 19 May 2016  路  4Comments  路  Source: BrowserSync/browser-sync

Issue details

Setting ghostMode to false, more specifically the click option stops the events from being propagated to other instances correctly but the underlying client logic is not turned off.

browser-sync-client adds a click eventListener which when emitted from a checkbox executes a forceChange() function which calls elem.blur() and elem.focus() which interferes with my React application.

Is there a way to disabled this at this moment?

Steps to reproduce/test case

  • Set ghostMode to false
  • Create an html with only a checkbox where: change, blur, focus events are logged
  • observe that even though ghostMode.click is off, the extra e.blur(); e.focus() is still present

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

  • Browsersync [2.12.1]

  • Node [6.1.0]
  • Npm [3.8.6]

    Affected platforms

  • [ ] linux

  • [ ] windows
  • [x] OS X
  • [ ] freebsd
  • [ ] solaris
  • [ ] other _(please specify which)_

    Browsersync use-case

  • [ ] API

  • [x] Gulp
  • [ ] Grunt
  • [ ] CLI

Most helpful comment

actually锛宨t doesn't [email protected]

image

All 4 comments

Is there a way to disabled this at this moment?

Not at the moment, no :(

The reasoning is that I wanted to enable options to be toggled without requiring a page reload. But after seeing this issue I think we can fix this for you.

Was just about to submit this issue and saw this. +1.

Fixed in [email protected]

clicks, scroll & form input event listeners will not be registered on initial page load anymore.

actually锛宨t doesn't [email protected]

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ilianaza picture ilianaza  路  4Comments

hgl picture hgl  路  3Comments

ericmorand picture ericmorand  路  3Comments

sedubois picture sedubois  路  3Comments

zewa666 picture zewa666  路  3Comments