backported bugfixes from state-machine branch

This commit is contained in:
Stephan Richter
2021-03-12 12:48:58 +01:00
parent 103dd89168
commit dc378b107b
3 changed files with 10 additions and 3 deletions

View File

@@ -177,9 +177,10 @@ function heartbeat(data){
function keypress(ev){
if (ev.code === 'Escape') return request({realm:"cu",action:"emergency"});
if (ev.code === 'Enter') {
if (ev.code === 'Enter') {
elem = ev.target;
while (elem != undefined && elem != null){
if (elem.nodeName == 'TEXTAREA') return false;
if (elem.nodeName == 'FORM') return submitForm(elem.getAttribute('id'));
elem = elem.parentNode;
}