fix(BaseUI): restore node list menu swallowed by module-frame SELECT dispatch (#11358)

* Fix input event handling to correctly identify real module frames in the UI

* Refactor input event handling comments for clarity on module frame validation
This commit is contained in:
Ixitxachitl
2026-08-05 18:44:58 +00:00
committed by GitHub
parent 08722da3d9
commit 32c3b62ef3
+4 -1
View File
@@ -2336,7 +2336,10 @@ int Screen::handleInputEvent(const InputEvent *event)
menuHandler::textMessageBaseMenu();
}
}
} else if (this->ui->getUiState()->currentFrame < moduleFrames.size()) {
// moduleFrames.size() bounds the module-frame region, before favorites are appended; its leading
// slots are nullptr padding for the built-in frames, so only a non-null entry is a real module frame.
} else if (this->ui->getUiState()->currentFrame < moduleFrames.size() &&
moduleFrames.at(this->ui->getUiState()->currentFrame) != nullptr) {
#if HAS_TELEMETRY && HAS_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
const MeshModule *currentModule = moduleFrames.at(this->ui->getUiState()->currentFrame);
if (environmentTelemetryModule != nullptr && environmentTelemetryModule->ownsFrame(currentModule)) {