Skip to content

Commit

Permalink
fixes night#3298
Browse files Browse the repository at this point in the history
  • Loading branch information
night committed Oct 31, 2018
1 parent d7679e5 commit e845f14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/modules/chat_freeze/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function setScrollState(enabled) {
}

function shouldFreeze(e) {
return FREEZE_KEYS.includes(e.keyCode) && $(`${CHAT_LIST_SELECTOR}:hover`).length && !document.hidden;
return FREEZE_KEYS.includes(e.charCode || e.keyCode) && $(`${CHAT_LIST_SELECTOR}:hover`).length && !document.hidden;
}

class ChatFreezeModule {
Expand Down
5 changes: 1 addition & 4 deletions src/modules/video_player/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function handleKeyEvent(keypress) {
const $player = $(VIDEO_PLAYER_SELECTOR);
if (!$player.length) return;

switch (keypress.keyCode) {
switch (keypress.charCode || keypress.keyCode) {
case keyCodes.KeyPress.LessThan:
case keyCodes.KeyPress.Comma:
stepPlaybackSpeed(false);
Expand All @@ -45,15 +45,12 @@ function handleKeyEvent(keypress) {
case keyCodes.KeyPress.Period:
stepPlaybackSpeed(true);
break;
case keyCodes.KeyPress.K:
case keyCodes.KeyPress.k:
$player.find('.qa-pause-play-button').click();
break;
case keyCodes.KeyPress.F:
case keyCodes.KeyPress.f:
$player.find('.qa-fullscreen-button').click();
break;
case keyCodes.KeyPress.M:
case keyCodes.KeyPress.m:
$player.find('.qa-control-volume').click();
break;
Expand Down

0 comments on commit e845f14

Please sign in to comment.