From 32c3b62ef348f61db27742d52b0bfbe5f717dbb7 Mon Sep 17 00:00:00 2001 From: Ixitxachitl Date: Wed, 5 Aug 2026 11:44:58 -0700 Subject: [PATCH] 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 --- src/graphics/Screen.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index bf13fa0a2..f1d8f33fa 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -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)) {