comparison js/core.js @ 2982:b3ebd07e7a0f

Fix for #270
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Sun, 04 Feb 2018 11:16:20 +0000
parents d5432dd0924e
children bc33aca9f8f1 171706465aa9
comparison
equal deleted inserted replaced
2981:24681d53ee7a 2982:b3ebd07e7a0f
2422 } 2422 }
2423 2423
2424 function trackCommentFocus() { 2424 function trackCommentFocus() {
2425 return document.activeElement.className.indexOf("trackComment") >= 0; 2425 return document.activeElement.className.indexOf("trackComment") >= 0;
2426 } 2426 }
2427 if (trackCommentFocus()) {
2428 return;
2429 }
2427 if (e.key === " ") { 2430 if (e.key === " ") {
2428 if (isPlaying() && trackCommentFocus() === false) { 2431 if (isPlaying()) {
2429 e.preventDefault(); 2432 e.preventDefault();
2430 audioEngineContext.stop(); 2433 audioEngineContext.stop();
2431 } 2434 }
2432 } else { 2435 } else {
2433 keypress.call(this, e.key); 2436 keypress.call(this, e.key);