summaryrefslogtreecommitdiff
path: root/platform/javascript/godot_shell.html
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-07-23 13:13:09 +0200
committerGitHub <noreply@github.com>2017-07-23 13:13:09 +0200
commit401f1098f6c244ab6e2d0d793dc1afbbbbe78eb8 (patch)
treed2f08e241efb09f679ff8d29e92fa5cc57af0438 /platform/javascript/godot_shell.html
parentba7fdcfd02e9812169718b1147af87b631327885 (diff)
parentca28c068c0dc6a95a60e5a70ce00d75f9b6f37a0 (diff)
Merge pull request #9770 from eska014/html5-focus
Implement input focus behavior in HTML5
Diffstat (limited to 'platform/javascript/godot_shell.html')
-rw-r--r--platform/javascript/godot_shell.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/javascript/godot_shell.html b/platform/javascript/godot_shell.html
index 6c7069a8f0..ee7399a129 100644
--- a/platform/javascript/godot_shell.html
+++ b/platform/javascript/godot_shell.html
@@ -83,6 +83,10 @@
color: white;
}
+ #canvas:focus {
+ outline: none;
+ }
+
/* Status display
* ============== */
@@ -147,7 +151,7 @@ $GODOT_HEAD_INCLUDE
</head>
<body>
<div id="container">
- <canvas id="canvas" width="640" height="480" onclick="canvas.ownerDocument.defaultView.focus();" oncontextmenu="event.preventDefault();">
+ <canvas id="canvas" width="640" height="480" tabindex="0" oncontextmenu="event.preventDefault();">
HTML5 canvas appears to be unsupported in the current browser.<br />
Please try updating or use a different browser.
</canvas>