Playing further with the HTML builds, and appear to have found another bug.
This is the entirety of a demo app:
display.newRect(512, 384, 1024, 768) function tapTest(event) print(event.x .. " x " .. event.y) end -- Do something when the screen is tapped Runtime:addEventListener('tap', tapTest)
And the config:
application = { content = { width = 768, height = 1024, scale = "letterbox", fps = 60, }, }
Compiled demo here:
https://development.qweb.co.uk/html5/test/index-debug.html
In a nutshell, clicking anywhere within the white recrangle prints out the screen x,y co-ord. Works perfectly when clicking, but on touch devices:
-
for me wherever I touch returns “-63.5 x 0.5”. I’m guessing this is something different on every device.
-
after the first touch, further touches are ignored until a mouse click. Then touch works again but always returns the same co-ord.
Hopefully enough info. Attached the test app too.