new hvnc
This commit is contained in:
@@ -690,7 +690,7 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
||||
});
|
||||
canvas.addEventListener("mousedown", function (e) {
|
||||
if (!mouseCtrl.checked) return;
|
||||
canvas.focus();
|
||||
canvas.focus({ preventScroll: true });
|
||||
const pt = getCanvasPoint(e);
|
||||
if (pt) {
|
||||
pendingMove = pt;
|
||||
@@ -728,12 +728,12 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
||||
|
||||
canvas.setAttribute("tabindex", "0");
|
||||
canvas.addEventListener("click", function () {
|
||||
canvas.focus();
|
||||
canvas.focus({ preventScroll: true });
|
||||
});
|
||||
if (kbdCtrl) {
|
||||
kbdCtrl.addEventListener("change", function () {
|
||||
if (kbdCtrl.checked) {
|
||||
canvas.focus();
|
||||
canvas.focus({ preventScroll: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
||||
});
|
||||
kbdCtrl.addEventListener("change", function () {
|
||||
if (kbdCtrl.checked) {
|
||||
canvas.focus();
|
||||
canvas.focus({ preventScroll: true });
|
||||
}
|
||||
pushInputToggles();
|
||||
});
|
||||
@@ -958,7 +958,7 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
||||
});
|
||||
canvas.addEventListener("mousedown", function (e) {
|
||||
if (!mouseCtrl.checked) return;
|
||||
canvas.focus();
|
||||
canvas.focus({ preventScroll: true });
|
||||
const pt = getCanvasPoint(e);
|
||||
if (pt) {
|
||||
pendingMove = pt;
|
||||
@@ -985,7 +985,7 @@ import { encodeMsgpack, decodeMsgpack } from "./msgpack-helpers.js";
|
||||
|
||||
canvas.setAttribute("tabindex", "0");
|
||||
canvas.addEventListener("click", function () {
|
||||
canvas.focus();
|
||||
canvas.focus({ preventScroll: true });
|
||||
});
|
||||
canvas.addEventListener("keydown", function (e) {
|
||||
if (!kbdCtrl.checked) return;
|
||||
|
||||
Reference in New Issue
Block a user