summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-10-03 17:12:05 +0300
committerMaxim Devaev <[email protected]>2022-10-03 17:12:05 +0300
commit056d8d037b379fcf96a169a9365ae9fd0f0c7625 (patch)
tree48e4e4c7360b1877bde650063cf1219afa8a9d8e /web
parent81da1ae86b9f1a8cfc04f513848c621846459781 (diff)
don't check preventDefault()
Diffstat (limited to 'web')
-rw-r--r--web/share/js/kvm/keyboard.js4
-rw-r--r--web/share/js/kvm/mouse.js5
2 files changed, 3 insertions, 6 deletions
diff --git a/web/share/js/kvm/keyboard.js b/web/share/js/kvm/keyboard.js
index 7f4c4f84..aff2b700 100644
--- a/web/share/js/kvm/keyboard.js
+++ b/web/share/js/kvm/keyboard.js
@@ -123,9 +123,7 @@ export function Keyboard(__recordWsEvent) {
};
var __keyboardHandler = function(event, state) {
- if (event.preventDefault) {
- event.preventDefault();
- }
+ event.preventDefault();
__keypad.emitByKeyEvent(event, state);
};
diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js
index faacdb3e..894d64cf 100644
--- a/web/share/js/kvm/mouse.js
+++ b/web/share/js/kvm/mouse.js
@@ -247,9 +247,8 @@ export function Mouse(__getGeometry, __recordWsEvent) {
var __streamWheelHandler = function(event) {
// https://learn.javascript.ru/mousewheel
// https://stackoverflow.com/a/24595588
- if (event.preventDefault) {
- event.preventDefault();
- }
+
+ event.preventDefault();
if (!__absolute && !__isRelativeCaptured()) {
return;