Skip to content

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

@npwoods

Description

@npwoods

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:widgetsImplementation of widgets (from std-widgets.slint) and their styles (mF,bS)need triagingIssue that the owner of the area still need to triage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions