fix: Disable browser ctrl + S in web build
This commit is contained in:
parent
248acd5e26
commit
9e83d9e68c
9
dist/web/source/wasm-config.js
vendored
9
dist/web/source/wasm-config.js
vendored
@ -263,6 +263,9 @@ function js_resizeCanvas() {
|
|||||||
canvas.height = Math.min(document.documentElement.clientHeight, window.innerHeight || 0);
|
canvas.height = Math.min(document.documentElement.clientHeight, window.innerHeight || 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent default browser shortcuts from preventing ImHex ones to work
|
// Prevent some default browser shortcuts from preventing ImHex ones to work
|
||||||
document.addEventListener('keydown', e => { e.preventDefault(); })
|
document.addEventListener('keydown', e => {
|
||||||
document.addEventListener('keyup', e => { e.preventDefault(); })
|
if (e.ctrlKey) {
|
||||||
|
if (e.which == 83) e.preventDefault();
|
||||||
|
}
|
||||||
|
})
|
Loading…
x
Reference in New Issue
Block a user