From b29966ae7d3bdc5e3ed1ed53a9ebf04584a7e12e Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Tue, 16 May 2017 12:02:44 -0400 Subject: [PATCH] Add comment to explain edge case --- src/containers/sound-library.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/sound-library.jsx b/src/containers/sound-library.jsx index 53aaf04da..53aa6bde0 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) { -- GitLab