|
@@ -12303,8 +12303,10 @@ void ImGui::NavMoveRequestApplyResult()
|
|
|
g.NavLastValidSelectionUserData = ImGuiSelectionUserData_Invalid;
|
|
|
}
|
|
|
|
|
|
- // FIXME: Could become optional e.g. ImGuiNavMoveFlags_NoClearActiveId if we later want to apply navigation requests without altering active input.
|
|
|
- if (g.ActiveId != result->ID)
|
|
|
+ // Clear active id unless requested not to
|
|
|
+ // FIXME: ImGuiNavMoveFlags_NoClearActiveId is currently unused as we don't have a clear strategy to preserve active id after interaction,
|
|
|
+ // so this is mostly provided as a gateway for further experiments (see #1418, #2890)
|
|
|
+ if (g.ActiveId != result->ID && (g.NavMoveFlags & ImGuiNavMoveFlags_NoClearActiveId) == 0)
|
|
|
ClearActiveID();
|
|
|
|
|
|
// Don't set NavJustMovedToId if just landed on the same spot (which may happen with ImGuiNavMoveFlags_AllowCurrentNavId)
|