Skip to content

Commit

Permalink
Merge pull request #4570 from LearnHub/keyboard-getLayoutMap-iframe
Browse files Browse the repository at this point in the history
keyboard.getLayoutMap() throws an exception in iFrame on Chrome
  • Loading branch information
netpro2k authored Sep 2, 2021
2 parents d16a21b + e402cae commit e8ad2c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/react-components/room/TipContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ if (window.navigator.keyboard !== undefined && window.navigator.keyboard.getLayo
"D"}`.toUpperCase();
turnLeftKey = map.get("KeyQ")?.toUpperCase();
turnRightKey = map.get("KeyE")?.toUpperCase();
}).catch(function(e) {
// This occurs on Chrome 93 when the Hubs page is in an iframe
console.warn(`Unable to remap keyboard: ${e}`);
});
}

Expand Down

0 comments on commit e8ad2c6

Please sign in to comment.