codecombat/codecombat — pull request #427 by yangshun (2014-02-26 18:46:14+00:00)
Title: Blur the music button after click so that subsequent space and enter keydown events do not trigger it. Fixes issue #306.

In the original code, there was no `$(document.activeElement).blur()` function fired after the music button was clicked (there was blur for the toggle play and toggle volume buttons). This caused the music button to remain in the focused state after the user clicks on it. Subsequent space and enter keydown events would toggle the state of the music button.

Moved the click event code for the music button into a new function and added a call to `$(document.activeElement).blur()` at the end of it.