diff --git a/src/containers/sound-library.jsx b/src/containers/sound-library.jsx index 53aaf04da5e0be6e07a88f082e853a03c5abd928..53aa6bde02f9d54e0d394691549bd04416c7bce5 100644 --- a/src/containers/sound-library.jsx +++ b/src/containers/sound-library.jsx @@ -23,6 +23,7 @@ class SoundLibrary extends React.Component { this.player = this.audioEngine.createPlayer(); } componentWillReceiveProps (newProps) { + // Stop playing sounds if the library closes without a mouseleave (e.g. by using the escape key) if (this.player && !newProps.visible) this.player.stopAllSounds(); } handleItemMouseEnter (soundItem) {