mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Fix keyboard focus lock-out with HTML5 canvas in iframe
(cherry picked from commit 9080e96bc8)
This commit is contained in:
parent
10c12b37ec
commit
868c44b239
3 changed files with 10 additions and 6 deletions
|
|
@ -173,6 +173,10 @@
|
|||
actualCanvas.style.padding = 0;
|
||||
actualCanvas.style.borderWidth = 0;
|
||||
actualCanvas.style.borderStyle = 'none';
|
||||
// disable right-click context menu
|
||||
actualCanvas.addEventListener('contextmenu', function(ev) {
|
||||
ev.preventDefault();
|
||||
}, false);
|
||||
// until context restoration is implemented
|
||||
actualCanvas.addEventListener('webglcontextlost', function(ev) {
|
||||
alert("WebGL context lost, please reload the page");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue