Semantic-Org / Semantic-UI-React

The official Semantic-UI-React integration
https://react.semantic-ui.com
MIT License
13.23k stars 4.05k forks source link

Max call stack exceeded when selecting disabled item in dropdown while wrapSelection is false #4366

Open ctoppel opened 2 years ago

ctoppel commented 2 years ago

Bug Report

Steps

Create a Dropdown with the wrapSelection prop set to false add options and set disabled to true on the first or last option use the arrow keys to move to the disabled option

Expected Result

Expected to not have an error and stay on the option prior to the disabled option

Actual Result

Receive Uncaught RangeError: Maximum call stack size exceeded when press arrow key that would move on to the disabled item.

Version

2.1.1

Testcase

https://codesandbox.io/s/semantic-ui-react-forked-yrv1xm?file=/index.js

Unsfer commented 1 year ago

Same issue #2577, but closed