Only grab key events on canvas

Give the canvas proper focus handling. This avoids messy logic that
needs to disable and enable event handling when we want to interact
with other UI elements.

It also makes sure we can properly inhibit the browser from triggering
local actions on key presses.
This commit is contained in:
Pierre Ossman
2016-10-05 10:21:17 +02:00
parent 69411b9ea3
commit 2afda54456
6 changed files with 31 additions and 43 deletions

View File

@@ -331,7 +331,7 @@
autocorrect="off" autocomplete="off" spellcheck="false"
mozactionhint="Enter"></textarea>
<canvas id="noVNC_canvas" width="0" height="0">
<canvas id="noVNC_canvas" width="0" height="0" tabindex="-1">
Canvas not supported.
</canvas>
</div>