Skip to content

Dropdown: automatically highlights the first element #3130

Open
@Brqqq

Description

@Brqqq

Bug Report

Steps

  1. Create a dropdown with static data inside of it, with 2 or more items to illustrate it better
  2. Open the dropdown by clicking on it.

Expected Result

None of the options should be highlighted, until you hover over it with your mouse or use your "up" or "down" arrow keys.

Currently the non-React version of Semantic UI already behaves like this.

Actual Result

The first item is highlighted. So it acts as if you have your mouse hovered over this first item.

Version

0.82.3

Testcase

This issue can be seen on the doc page demos. A specific example of a simple dropdown where this issue can be seen:
https://codesandbox.io/s/218np7y82j

Compare this to the non-React version where this issue is NOT present:
https://jsfiddle.net/7adbsm6r/5/

I have assumed it's a bug, because of this behaviour is different than the non-React version. The non-React version behaves in the way that I described in the "expected result".

Here's an image showing the difference. This is an uncontrolled dropdown and when you first open it, without hovering your mouse over any option

Comparison between the react and non-react version of semantic

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions