mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix the dropdown selection race and make selection emission intentional and robust. Emit onSelectedIndexesChange synchronously exactly when selection is committed (pointer press, keyboard actions). This removes the LaunchedEffect race where the popup could close before emission. Keep hover purely visual: update only lastActiveItemIndex on move/enter; never touch selectedKeys. Retain a tiny LaunchedEffect as a secondary path to re-emit when the key→index mapping changes (reorder/header/programmatic updates). It recomputes indices from the current container, dedupes emissions, and primes lastActiveItemIndex so the first arrow after remaps works. In ListComboBox, confirm-on-click: clicking an item selects and then closes in the same call chain; outside clicks dismiss via onDismissRequest. Keyboard navigation remains centralized at the combo (inner list uses NoopListKeyActions) to avoid double handling. Follow-up (not in this patch): route all keyboard navigation to the inner SelectableLazyColumn while the popup is open. https://github.com/JetBrains/intellij-community/pull/3286 (cherry picked from commit 0be64c017c9e27d951cd83542c0b219422b6aea6) IJ-CR-181454 GitOrigin-RevId: 8c5181f29afdd6d4486bfc8c3d142f92177f4c21