Semantic-ui-react: Checkbox: `slider` is not clickable in the entire area

Created on 14 Mar 2019  路  8Comments  路  Source: Semantic-Org/Semantic-UI-React

Bug Report

If you click in the space between the nub & the line it won't trigger the handler

Steps

click in the are of the arrow
image

Expected Result

It should allow click on the checkbox in that area.

Actual Result

It not clicks there, therefore it is hard to click on the toggle.

Version

0.86.0

Testcase

It should work as the jQuery version that is clickable in that area.
Checkout how it works https://semantic-ui.com/modules/checkbox.html#fitted

bug help wanted

All 8 comments

With label

SUI Slider

sui-slider

SUIR Slider

suir-slider

Works fine 猸愶笍


Without label

SUI 馃憤

sui-slider-bug

SUIR 馃挘

suir-slider-bug

I'm not exactly sure what the "hidden" classname does besides negative z-index, but if you remove it from the input element, the slider becomes clickable in the entire area, however this makes the label text have the wrong cursor on hover

It is possible to fix with given a label min-height of 1rem, the problem is that this change should be done in semantic-ui css, what is the best practice regarding scenarios such that?

Ping

I think that issue is around #3435, we partially handle clicks on label while for slider we should handle them fully. It's an initial suggestion.

@layershifter the issue is that the label is with height of 0px.
image

Otherwise, if I add it a min-height it starts to work (with the hover effect) as expected.
image

image

Should I add the min-height to the label in semantic-ui css, or I can add it to inline style of the component.

@layershifter WDYT?

@felixmosh this should be fixed on our side, fix is coming in #3693.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryanpcmcquen picture ryanpcmcquen  路  3Comments

AlvMF1 picture AlvMF1  路  3Comments

laukaichung picture laukaichung  路  3Comments

keeslinp picture keeslinp  路  3Comments

saikrishnadeep picture saikrishnadeep  路  3Comments