Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Fix bug when negating property in and removing duplicate property #49

Merged
merged 1 commit into from
Nov 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions SignallingWebServer/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2538,7 +2538,6 @@ const CodeToKeyCode = {
"NumLock": 144,
"ControlRight": 254,
"AltRight": 255,
"Pause": 19,
"Home": 36,
"End": 35,
"ArrowUp": 38,
Expand All @@ -2557,7 +2556,7 @@ function getKeyCode(e) {

// If we don't have keyCode property because browser API is deprecated then use KeyboardEvent.code instead.
// See: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode#constants_for_keycode_value
if(!"keyCode" in e) {
if(!("keyCode" in e)) {
// Convert KeyboardEvent.code string into integer-based key code for backwards compatibility reasons.
if(e.code in CodeToKeyCode) {
return CodeToKeyCode[e.code];
Expand Down Expand Up @@ -2620,7 +2619,7 @@ function registerKeyboardEvents() {
};

document.onkeypress = function(e){
if(!"charCode" in e){
if(!("charCode" in e)){
console.warn("KeyboardEvent.charCode is deprecated in this browser, cannot send key press.");
return;
}
Expand Down