Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.12k stars 4.94k forks source link

Select Dropdown - click on label should trigger a toggle instead of open only (Chrome) #6638

Open etshy opened 6 years ago

etshy commented 6 years ago

Steps

-Make a Select dropdown with a label linked to it -Click on label

Expected Result

Toggle the dropdown

Actual Result

Only open the dropdown If it's already opened, it will quickly close it and reopen it.

Version

I'm currently using fomantic-ui 2.6.3 but they merge the official release of semantic-ui into their releases.

Testcase

Made a quick jsfiddle here : https://jsfiddle.net/4v9m5sdz/ Forked from the proposed jsfiddle in issue template (so latest release of semantic-ui, I guess).

Just tested on Chrome, no time to test on other browser now.

I didn't take a look at the js, but I assume trigering the toggle method instead of the open should do the trick (?) Or if there is a onclick on the the label AND a onfocus on the select, and both are triggering the toggle method, deleting the onclick on label should do it too.

y0hami commented 6 years ago

Your JSFiddle is the default SUI template, could you please create a new one.

etshy commented 6 years ago

Ow, I didn't save it ...

Here is one that should be good : https://jsfiddle.net/d0aosr6q/1

lubber-de commented 5 years ago

Fixed since 2.6.4 https://github.com/fomantic/Fomantic-UI/pull/247