mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix keyboard focus lock-out with HTML5 canvas in iframe
This commit is contained in:
parent
0f930f8314
commit
9080e96bc8
3 changed files with 10 additions and 6 deletions
|
|
@ -161,6 +161,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