Bug multitouch in html5

When I touch the rectA and after I touch the rectB, rectA is released immediately. The error show in html5 but in android it work ok. Try code in below.

local rectA = display.newRect( 200, 200, 200, 200 ); rectA.name = "A" local rectB = display.newRect( 800, 200, 200, 200 ); rectB.name = "B" rectB:setFillColor( 1, 0, 0 ) local function tapControl( event ) local btn = event.target; if(event.phase == "began") then print( "tapControl", event.id, btn.name ) display.getCurrentStage():setFocus(btn, event.id); btn.hasFocus = true; btn.xScaleBefor, btn.yScaleBefor = btn.xScale, btn.yScale; btn:scale( 0.9, 0.9 ); elseif(btn.hasFocus) then if ( event.phase == "ended" or event.phase == "cancelled" ) then btn.xScale = btn.xScaleBefor; btn.yScale = btn.yScaleBefor; display.getCurrentStage():setFocus(btn, nil); btn.hasFocus = false; end end return true; end local function tapNew( event ) local btn = event.target; if(event.phase == "began") then print( "tapNew", event.id, btn.name ) display.getCurrentStage():setFocus(btn, event.id); btn.hasFocus = true; btn.xScaleBefor, btn.yScaleBefor = btn.xScale, btn.yScale; btn:scale( 0.9, 0.9 ); elseif(btn.hasFocus) then if ( event.phase == "ended" or event.phase == "cancelled" ) then btn.xScale = btn.xScaleBefor; btn.yScale = btn.yScaleBefor; display.getCurrentStage():setFocus(btn, nil); btn.hasFocus = false; end end return true; end rectA:addEventListener( "touch", tapControl ) rectB:addEventListener( "touch", tapNew )

I saw a status report that an engineer is working on fixing a multitouch bug in HTML5. I don’t know if its this specific issue or not. Watch the next couple of daily builds to see if this gets fixed.

Rob

Fixed… It should work properly with daily build 3317

How long does daily build 3317 release? Thanks

it’s alive already

oops, sorry, the fix was not included into 3317… it will be in 3318

Hi

i updated build 3318 but multitouch dont work in android browser and in ios browser touch and tap event dont work. I try reinstall build 3317 ios touch and tap event work normal. 

try 3319 and do not forget to enable multitouch via system.activate( “multitouch” )

https://docs.coronalabs.com/api/library/system/activate.html

tested with build 3319.multitouch work in android browser but tap event dont work and in ios browser  touch and tap event dont work.

Do you have a URL to your app/game?

Rob

This is my game URL: https://allgamehtml5.000webhostapp.com/Monkey%20Jumping/

or try this code

system.activate( "multitouch" ) local rectA = display.newRect( 200, 200, 200, 200 ); rectA.name = "A" local rectB = display.newRect( 800, 200, 200, 200 ); rectB.name = "B" rectB:setFillColor( 1, 0, 0 ) local function tapControl( event ) local btn = event.target; if(event.phase == "began") then print( "tapControl", event.id, btn.name ) display.getCurrentStage():setFocus(btn, event.id); btn.hasFocus = true; btn.xScaleBefor, btn.yScaleBefor = btn.xScale, btn.yScale; btn:scale( 0.9, 0.9 ); elseif(btn.hasFocus) then if ( event.phase == "ended" or event.phase == "cancelled" ) then btn.xScale = btn.xScaleBefor; btn.yScale = btn.yScaleBefor; display.getCurrentStage():setFocus(btn, nil); btn.hasFocus = false; end end return true; end local function tapNew( event ) local btn = event.target; if(event.phase == "began") then print( "tapNew", event.id, btn.name ) display.getCurrentStage():setFocus(btn, event.id); btn.hasFocus = true; btn.xScaleBefor, btn.yScaleBefor = btn.xScale, btn.yScale; btn:scale( 0.9, 0.9 ); elseif(btn.hasFocus) then if ( event.phase == "ended" or event.phase == "cancelled" ) then btn.xScale = btn.xScaleBefor; btn.yScale = btn.yScaleBefor; display.getCurrentStage():setFocus(btn, nil); btn.hasFocus = false; end end return true; end rectA:addEventListener( "touch", tapControl ) rectB:addEventListener( "touch", tapNew ) local rectC = display.newRect( 1200, 600, 200, 200 ); rectC.name = "C" local txtTap = display.newText( "Tap Event", rectC.x, rectC.y ) txtTap:setFillColor( black ) rectC:addEventListener( "tap", function( event ) print( event.target.name ) end )

Our engineers are working on the problem.

Rob

Is this related to an HTML5 issue that I seem to be encountering (in version 3319): event.id is always nil in my touch events regardless of whether multitouch is on or off.

We are prepping a public build and gotta get the bugs out.

I saw a status report that an engineer is working on fixing a multitouch bug in HTML5. I don’t know if its this specific issue or not. Watch the next couple of daily builds to see if this gets fixed.

Rob

Fixed… It should work properly with daily build 3317

How long does daily build 3317 release? Thanks

it’s alive already

oops, sorry, the fix was not included into 3317… it will be in 3318

Hi

i updated build 3318 but multitouch dont work in android browser and in ios browser touch and tap event dont work. I try reinstall build 3317 ios touch and tap event work normal.