Daniel Heath
Daniel Heath

Reputation: 414

Inexplicable page refreshes getting triggered after a socket.io message

I'm writing a multiroom chat server to learn nodejs.

The code is here: https://github.com/DanielHeath/furious-earth-2/tree/backbone And the app is live here: http://furious-earth.herokuapp.com/

The issue is that when running in development mode, the page refreshes whenever you log in to a room.

What I've found so far:

I can't figure out what is causing it - or even how to approach debugging it.

Any thoughts?

Upvotes: 3

Views: 218

Answers (1)

Pointy
Pointy

Reputation: 413712

One thing to look for: event handlers on your page(s) bound to <a> elements or to things that cause form submission (<button> tags with type "submit", or "submit" <input> elements, and other things like that). If those don't properly prevent the default action of "click" events, then the browser will end up reloading the page(s).

Upvotes: 1

Related Questions