Why is there no focus on the second rectangle?
-- Create two display objects on the screen local newRect1 = display.newRect( display.contentCenterX, 160, 60, 60 ) newRect1:setFillColor( 1, 0, 0.3 ) local newRect2 = display.newRect( display.contentCenterX, 320, 60, 60 ) newRect2:setFillColor( 0.3, 0, 1 ) -- Touch event listener local function touchListener( event ) print("logging") end -- Add a touch listener to each object newRect1:addEventListener( "touch", touchListener ) newRect2:addEventListener( "touch", touchListener ) display.getCurrentStage():setFocus( newRect2)