fix(color): prevent event bubbling in Page and TabsGroup (#2642)

... otherwise unexpected things happen
This commit is contained in:
Raphael Coeffic
2022-10-31 17:46:31 +10:00
committed by GitHub
parent 93ec316a4b
commit 40caa999f4
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -83,3 +83,8 @@ void Page::onClicked()
{
Keyboard::hide();
}
void Page::onEvent(event_t event)
{
// block event bubbling
}
+2
View File
@@ -61,6 +61,8 @@ class Page : public Window
protected:
PageHeader header;
FormWindow body;
void onEvent(event_t event) override;
};
#endif // _PAGE_H_
-2
View File
@@ -271,8 +271,6 @@ void TabsGroup::onEvent(event_t event)
killEvents(event);
uint8_t current = header.carousel.getCurrentIndex();
setCurrentTab(current == 0 ? tabs.size() - 1 : current - 1);
} else if (parent) {
parent->onEvent(event);
}
#endif
}