mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-08 22:35:15 -06:00
ENH:close dialog by pressing esc key
Change-Id: Ib883e7119699e06f63c61dd083ad761ba58bc19c
This commit is contained in:
parent
03f62ed9ae
commit
121dccc59c
7 changed files with 92 additions and 3 deletions
|
@ -146,4 +146,22 @@
|
|||
</div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
document.onkeydown = function (event) {
|
||||
var e = event || window.event || arguments.callee.caller.arguments[0];
|
||||
|
||||
if (e.keyCode == 27)
|
||||
ClosePage();
|
||||
|
||||
if (window.event) {
|
||||
try { e.keyCode = 0; } catch (e) { }
|
||||
e.returnValue = false;
|
||||
}
|
||||
};
|
||||
window.addEventListener('wheel', function (event) {
|
||||
if (event.ctrlKey === true || event.metaKey) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}, { passive: false });
|
||||
</script>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue