mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
Yield focus to canvas on clicking body
This commit is contained in:
parent
795e7c8eb2
commit
74e3c40740
@ -71,6 +71,9 @@ func init() {
|
|||||||
bodyStyle.Set("height", "100%")
|
bodyStyle.Set("height", "100%")
|
||||||
bodyStyle.Set("margin", "0")
|
bodyStyle.Set("margin", "0")
|
||||||
bodyStyle.Set("padding", "0")
|
bodyStyle.Set("padding", "0")
|
||||||
|
doc.Get("body").Set("onclick", func() {
|
||||||
|
canvas.Call("focus")
|
||||||
|
})
|
||||||
|
|
||||||
canvasStyle := canvas.Get("style")
|
canvasStyle := canvas.Get("style")
|
||||||
canvasStyle.Set("position", "absolute")
|
canvasStyle.Set("position", "absolute")
|
||||||
|
Loading…
Reference in New Issue
Block a user