Touch leak in storyboard.showOverlay()

I have a storyboard scene which works fine with gotoScene, but leaks touch events to the scene behind the pop-up with storyboard.showOverlay. Did anyone notice this? [import]uid: 19297 topic_id: 26363 reply_id: 326363[/import]

yes its true

just made rect as a part of popup scene and add touch event handler to it without any action

local function onListener()
return true
end
blackRect:addEventListener( “touch”, onListener ) [import]uid: 111283 topic_id: 26363 reply_id: 106899[/import]

Storyboard doesn’t automatically create a rectangle to disallow touches to the scene behind, because in doing so, it would disable functionality for those who *need* to be able to have touches behind the overlay scene (for example, if the overlay scene and the scene below use the same menu).

Bladko’s solution is what I recommend if you do not want to have touches leak behind the overlay scene (the rectangle should be created before you call storyboard.showOverlay(), and then it should be removed during the “overlayEnded” event). [import]uid: 52430 topic_id: 26363 reply_id: 106931[/import]

Thanks to both of you.

JB: It would be nice to have this as a note in the documentation. [import]uid: 19297 topic_id: 26363 reply_id: 106951[/import]

We just added an ‘isModal’ option to storyboard.showOverlay() which will allow you to easily prevent touches from “going through” the overlay scene just by setting it to true (default will be false).

It should be in one of the next few daily builds (could be the next one, or the one after). [import]uid: 52430 topic_id: 26363 reply_id: 107128[/import]

@JB: wonderful! [import]uid: 19297 topic_id: 26363 reply_id: 107129[/import]