react-select icon indicating copy to clipboard operation
react-select copied to clipboard

Disabled options are keyboard selectable

Open bhstahl opened this issue 11 years ago • 6 comments

Observed:

Setting an option as disabled blocks mouse focus/selection, but when tabbing through the list with a keyboard, the option enters a focus state and can still be selected.

Expected:

Setting an option as disabled blocks mouse and keyboard focus/selection.

bhstahl avatar Aug 13 '15 18:08 bhstahl

Are you on the latest version (0.6.2) this was fixed around 0.6.0, and there's an explicit test for this behaviour, so it shouldn't have come back!

bruderstein avatar Aug 13 '15 19:08 bruderstein

Ah sorry about that! Somehow missed #274 and was < 6.0. Works great, thanks!

bhstahl avatar Aug 13 '15 19:08 bhstahl

@bruderstein go to the example page http://jedwatson.github.io/react-select. For the first select called "STATES" choose "US". Type inside the select "Alabama" and hit enter. The disabled option is selected.

Expected behavior: the disabled option should not be selectable via keyboard

cosminnicula avatar Aug 20 '15 15:08 cosminnicula

@cosminnicula this is the case for me at least, we fixed this in the last release (hence the issue is closed)

Is "Alabama" still selectable via keyboard for you? If so, can you double check you've refreshed, and then let us know the browser & version?

bruderstein avatar Aug 20 '15 15:08 bruderstein

I've tested this directly on the examples website http://jedwatson.github.io/react-select

cosminnicula avatar Aug 20 '15 15:08 cosminnicula

Ah, I see now the issue, when we type and it's the only option available. Apologies, I hadn't properly followed your instructions. I've reopened the issue, and I'll aim to get a PR in tonight.

Thank you for reporting.

bruderstein avatar Aug 20 '15 15:08 bruderstein