emilk / emilk/egui

Items in combobox do not close list popup if the popup covers the combobox

Open
#3,440 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
30.6k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
72

Description

**Describe the bug**
When opening a combobox, it checks whether the window is too small to expand downwards and moves itself up to fit in the window. If this happens and you click a section of the list that covers the original combobox, it will not close the list. I assume it does not "eat"/block the input properly and immediately opens the list again.

**To Reproduce**
Steps to reproduce the behavior:
1. Open an egui application with a combobox.
2. Make the window small enough so that the list cannot fit in the area under the combobox.
3. Open the combobox and click an item that covers the area where the (now hidden) combobox was.
4. Observe that the clicked item is selected, but the menu is not closed.

**Expected behavior**
When clicking an item in a combobox, the popped up list should close.

**Screenshots**

https://github.com/emilk/egui/assets/13605369/5597a7f1-01d6-4a83-8d1e-600ca2a3ed4f

**Desktop (please complete the following information):**
- OS: Windows

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the combobox behavior in an egui application with a window too small for the popup to expand downward. Select an item where the popup covers the original combobox; done means the item is selected and the list closes instead of reopening.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.