mirror of https://github.com/axmolengine/axmol.git
[FIX]: make sure parent is visible before handling touch
This commit is contained in:
parent
6d8c1cd4f1
commit
f19acbb6db
|
@ -591,9 +591,12 @@ void TableView::onTouchEnded(Touch *pTouch, Event *pEvent)
|
|||
|
||||
bool TableView::onTouchBegan(Touch *pTouch, Event *pEvent)
|
||||
{
|
||||
if (!this->isVisible())
|
||||
for (Node *c = this; c != nullptr; c = c->getParent())
|
||||
{
|
||||
return false;
|
||||
if (!c->isVisible())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool touchResult = ScrollView::onTouchBegan(pTouch, pEvent);
|
||||
|
|
Loading…
Reference in New Issue