components/icon_button.c: wrong component propagated
Usually the component in callbacks is the source component, not
parent. The child does not know how deeply it is nested, etc.
The parent is responsible for this.
@@ -122,7 +122,7 @@ static void _on_event(const event_t* event, component_t* component)
case EVENT_TOP_SHORT_TAP:
case EVENT_BOTTOM_SHORT_TAP:
if (data->callback) {
- data->callback(component->parent);
+ data->callback(component);
}
break;
default:
