Cleanup.
This commit is contained in:
parent
fc8ea76c1e
commit
aab1ca9a2b
|
|
@ -41,7 +41,7 @@
|
|||
<meta name="theme-color" content="#222" />
|
||||
<script src="static/plugins.js"></script>
|
||||
</head>
|
||||
<body onload="openwebrx_init();" onkeydown="Shortcuts.handleKeyEvent(event);">
|
||||
<body onload="openwebrx_init();">
|
||||
|
||||
<div id="webrx-page-container">
|
||||
${header}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
function Shortcuts() {}
|
||||
|
||||
Shortcuts.init = function(target) {
|
||||
target.addEventListener("keydown", this.handleKey);
|
||||
};
|
||||
|
||||
Shortcuts.moveSlider = function(slider, delta) {
|
||||
var $control = $(slider);
|
||||
if (!$control.prop('disabled')) {
|
||||
|
|
@ -21,7 +25,7 @@ Shortcuts.moveSelector = function(selector, steps) {
|
|||
}
|
||||
};
|
||||
|
||||
Shortcuts.handleKeyEvent = function(event) {
|
||||
Shortcuts.handleKey = function(event) {
|
||||
// Do not handle shortcuts when focused on a text or numeric input
|
||||
var on_input = !!($('input:focus').length && ($('input:focus')[0].type === 'text' || $('input:focus')[0].type === 'number'));
|
||||
if (on_input) return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue