Tabbar not blocking touches - touch event is also picked up by object underneath.

I have a scrollview on a few of my pages, so occasionally there may be an object directly underneath a tabbar button.

Since the event.name/phase is not the same for “tabbuttonpress” events as for “touch”/“tap” events, the event is picked up by the button underneath as well.

My tabbar press event returns true anyway, but this has no effect since the events are not the same.

Is there a simple fix for this? I’d be surprised if it had been overlooked for all this time.
[import]uid: 84115 topic_id: 33343 reply_id: 333343[/import]

I forgot to add that in the meantime I’ve added an invisible object which is the same size as the tabbar, and placed it beneath the tabbar. It has tap and touch listeners which return true but do nothing.

So I have a quick fix, but I was looking to see if there is a “proper” way to do this.

[code]
function touchBlock(e)
–no event.phase specified, I want this to block ALL touch/tap events
return true
end

tabsBG = display.newRect(0, display.contentHeight-100, display.contentWidth, 100)
tabsBG.isVisible = false
tabsBG.isHitTestable = true
tabsBG:addEventListener(“touch”, touchBlock)
tabsBG:addEventListener(“tap”, touchBlock)

[/code] [import]uid: 84115 topic_id: 33343 reply_id: 132404[/import]

I forgot to add that in the meantime I’ve added an invisible object which is the same size as the tabbar, and placed it beneath the tabbar. It has tap and touch listeners which return true but do nothing.

So I have a quick fix, but I was looking to see if there is a “proper” way to do this.

[code]
function touchBlock(e)
–no event.phase specified, I want this to block ALL touch/tap events
return true
end

tabsBG = display.newRect(0, display.contentHeight-100, display.contentWidth, 100)
tabsBG.isVisible = false
tabsBG.isHitTestable = true
tabsBG:addEventListener(“touch”, touchBlock)
tabsBG:addEventListener(“tap”, touchBlock)

[/code] [import]uid: 84115 topic_id: 33343 reply_id: 132404[/import]