photonstorm/phaser — pull request #166 by beeglebug (2013-11-03 23:20:24+00:00)
Title: fix for mouse input events still firing after game.destroy

The problem was that the events were registered with useCapture true, but removed without specifying.
According to the MDN (https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.removeEventListener)

"If not specified, useCapture defaults to false. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa."

So I added 'true' to the removed, and it now correctly removes them.

Some of the other add/remove pairings probably need checking as well, but I had a look and most of the addEventListsner calls use false, so the corresponding removes use the default of false, and work.