Fixed issue with typing password and such tried to pause video

This commit is contained in:
Kasper Rynning-Tønnesen
2017-05-28 18:15:31 +02:00
parent 03433f0329
commit 4901c46457
3 changed files with 8 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1562,7 +1562,12 @@ $(document).keydown(function(event) {
found_array = [];
found_array_index = 0;
}
} else if(event.keyCode == 32 && $(".search-container").hasClass("hide") && window.location.pathname != "/") {
} else if(event.keyCode == 32 && $(".search-container").hasClass("hide") && window.location.pathname != "/" &&
!$("#text-chat-input").is(":focus") &&
!$("#password").is(":focus") &&
!$("#user-pass-input").is(":focus") &&
!$("#chan_thumbnail").is(":focus") &&
!$("#chan_description").is(":focus")) {
if(Player.player.getPlayerState() == 1) {
event.preventDefault();
Player.player.pauseVideo();