~hristoast/mousikofidi

11cf4bcefd76932c3e897eabe0ccb0264844ece8 — Hristos N. Triantafillou 12 days ago d49e309
Override keyboard controls when trying to type into an input
1 files changed, 7 insertions(+), 0 deletions(-)

M mousikofidi/static/js/player.js
M mousikofidi/static/js/player.js => mousikofidi/static/js/player.js +7 -0
@@ 1056,6 1056,13 @@ function FidiKeyBindsSetup() {

        // Play/pause
        if (keyName === " ") {
            if (document.activeElement.nodeName == 'INPUT') {
                // The user has clicked inside of the "Save Queue" text box
                // and may want to type a playlist name with a space in it. In
                // any case, doing that isn't possible when we're trying to
                // apply our keyboard controls, so don't do that.
                return;
            }
            e.preventDefault();
            if (playArrows.length > 0) {
                var currentAction = audio.getAttribute("data-action");