bulma-switch icon indicating copy to clipboard operation
bulma-switch copied to clipboard

Checked attribute doesn't work by default

Open NPJigaK opened this issue 5 years ago • 3 comments

hello. @Wikiki

I found Bug

Use CDN.

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.8.0/css/bulma.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bulma-switch.min.css">

Regardless of whether it is set to checked="checked" or checked="", it is always displayed as checked.

When you check the DOM, it becomes checked="checked" . (In HTML, checked="" is used)

Thank you.

NPJigaK avatar Apr 06 '20 03:04 NPJigaK

@KagiJPN Found a workaround: simple uncheck the switch with Javascript when loading page.

EDIT: It's almost critical to say, that it depends on the backend that you use. I had the same problem with Django, but it was a problem with the framework itself, not with the component. Switch works as it should, checked = "" is a valid way to set checked value to checkbox too (W3 Docs). The issue should be closed. @Wikiki

TBury avatar Apr 24 '20 13:04 TBury

hello. @Wikiki

I found Bug

Use CDN.

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.8.0/css/bulma.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bulma-switch.min.css">

Regardless of whether it is set to checked="checked" or checked="", it is always displayed as checked.

When you check the DOM, it becomes checked="checked" . (In HTML, checked="" is used)

Thank you.

Add => link rel "stylesheet" href="https://wikiki.github.io/css/documentation.css?v=201911011043"

HDRamosMendoza avatar Sep 05 '20 19:09 HDRamosMendoza

https://hdramosmendoza.github.io/Frontend/Widget/Proyectos/index.html

HDRamosMendoza avatar Sep 06 '20 04:09 HDRamosMendoza