amberframework / jasper-helpers

A library of helpers for working with html for apps Crystal
https://amberframework.org
MIT License
19 stars 7 forks source link

fixes: labels for checkboxes aren't clickable #19

Closed robacarp closed 6 years ago

robacarp commented 7 years ago

This pattern is common and should produce a clickable label which increases the click surface of the checkbox:

    == check_box name: "allow", checked: object.allow
    == label :allow, "Allow things"

The current behavior incorrectly renders the hidden input with the same HTMTL id as the checkbox, which renders the label inoperable.

eliasjpr commented 7 years ago

What about doing something like == check_box name: "allow", id: "allowed_default", checked: object.allow?

robacarp commented 6 years ago

@eliasjpr I don't think that would correct the issue I'm seeing, but perhaps I don't understand your suggestion. Can you elaborate more?

elorest commented 6 years ago

Thanks again.