Skip to content

Commit 031c124

Browse files
committed
Tweak serial page to work better in Chrome
1 parent 8093f8e commit 031c124

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

supervisor/shared/web_workflow/static/serial.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<!DOCTYPE html>
22
<html style="height: 100%;">
3-
<meta name="viewport" content="width=device-width, initial-scale=1">
43
<head>
54
<title>Simple client</title>
6-
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<script src="/serial.js" defer=true></script>
88
</head>
99
<body style="flex-direction: column; display: flex; height: 100%; width: 100%; margin: 0; font-size: 1rem;">
10-
<div style="flex: auto; display: flex; overflow: scroll; flex-direction: column;">
10+
<div style="flex: auto; display: flex; overflow: auto; flex-direction: column;">
1111
<pre id="log" style="margin:0; margin-top: auto;"></pre>
12-
<span style="height: 1px;">&nbsp</span>
12+
<span style="height: 1px;"></span>
1313
</div>
1414
<div id="controls" style="flex: none; display: flex;">
1515
<fieldset style="display: inline-block; padding: 0;">

supervisor/shared/web_workflow/static/serial.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ws.onerror = function(e) {
5757
set_enabled(false);
5858
};
5959

60-
input.onbeforeinput = function(e) {
60+
input.addEventListener("beforeinput", function(e) {
6161
if (e.inputType == "insertLineBreak") {
6262
ws.send("\r");
6363
input.value = "";
@@ -68,7 +68,7 @@ input.onbeforeinput = function(e) {
6868
} else if (e.inputType == "deleteContentBackward") {
6969
ws.send("\b");
7070
}
71-
}
71+
});
7272

7373
let ctrl_c = document.querySelector("#c");
7474
ctrl_c.onclick = function() {

0 commit comments

Comments
 (0)