0

The title attribute is not working correctly on the checkbox, when the mouse is on the area serrounding the checkbox it works but not when the mouse is on the input element.

This is my checkbox code:

const StyledCheckbox = withStyles({
colorPrimary: {
    borderColor: '#757575',
    borderRadius: 1,
    '&$checked': {
        color: '#00adb3'
    },
},
checked: {},})(Checkbox);

and the render

 public render() {
    return <>
        <div className='checkbox-react'>
            <StyledCheckbox  color='primary' checked={this.state.checked} onClick={this.handleChange}
                                     title={'test test'}  onChange={this.handleChange}   />
        </div>
    </>;
}

Here's an example enter image description here enter image description here

Maha BENJEBARA
  • 232
  • 4
  • 12
  • could be something about the event handlers? https://stackoverflow.com/questions/26615779/react-checkbox-not-sending-onchange#answer-52386786 – Liren Yeo Dec 27 '18 at 10:28
  • What is the CSS that is styling the look of the `title`. The `title` seems to work fine for me [here](https://codesandbox.io/s/mopz17oq4y), but the look I'm seeing is just the browser default title behavior and it looks like you have something else. – Ryan Cogswell Dec 27 '18 at 17:13
  • Can you replicate your issue in codesandbox? – Nikhil Dec 28 '18 at 17:04

0 Answers0