Composer Overlay doesn't have focus

I just added  timed levels to my match 3 game.

Just wondering if anyone ever had this issue: When the timer ends (This is when the overlay is shown) and the player swipes a gem at that exact same time --> the overlay doesn’t have focus.

I added this code to the OnGemSwipe:(It seems to work so far)

if( bubblesMatch3.bIsThisATimedLevel and bubblesMatch3.levelTime == 0 ) then
        display.getCurrentStage():setFocus( target, nil )
 end

Just asking if this can be a problem??

Thanks!

Its always possible to have race conditions where your timer might trigger while other actions are going on.  Your solution should work pretty well.

Rob

Thanks Rob, it seems to be working fine now.

Its always possible to have race conditions where your timer might trigger while other actions are going on.  Your solution should work pretty well.

Rob

Thanks Rob, it seems to be working fine now.