Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComboBox items are overlaid when poped up, but always default to the first item #7336

Open
npwoods opened this issue Jan 11, 2025 · 1 comment
Labels
a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) bug Something isn't working need triaging Issue that the owner of the area still need to triage

Comments

@npwoods
Copy link
Contributor

npwoods commented Jan 11, 2025

Bug Description

Steps to reproduce:

  1. Run the attached Slint code in SlintPad
  2. Click and hold down the mouse on "This is selected first"
  3. When the combo box items pop up, the combo box items all drop down, meaning that the selected item is "But when I click on things, this is selected"
  4. Release the mouse - the "But.." item is selected

This seems to be because the combo box is always overlaid, but it seems to default to the first item. I would expect the combo box to either be overlaid in a fashion that kept the currently selected item, or one that did not overlay at all by putting all items above or below the combo box.

Reproducible Code (if applicable)

import { ComboBox } from "std-widgets.slint";

export component Demo {
    ComboBox {
        model: [@tr("But when I click on things, this is selected"), @tr("This is selected first"), @tr("Other thing")];
        current-index: 1;
        enabled: true;
    }
}

Environment Details

  • Slint Version: 9.1
  • Platform/OS: Slintpad
  • Programming Language: n/a
  • Backend/Renderer: n/a

Product Impact

No response

@npwoods npwoods added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Jan 11, 2025
@ogoffart ogoffart added the a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) label Jan 12, 2025
@hunger
Copy link
Member

hunger commented Jan 13, 2025

This looks like a duplicate of #6619.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS) bug Something isn't working need triaging Issue that the owner of the area still need to triage
Projects
None yet
Development

No branches or pull requests

3 participants