]> source.dussan.org Git - gitea.git/commit
Fix unclickable checkboxes (#30195) (#30199)
authorGiteabot <teabot@gitea.io>
Sun, 31 Mar 2024 00:05:52 +0000 (08:05 +0800)
committerGitHub <noreply@github.com>
Sun, 31 Mar 2024 00:05:52 +0000 (00:05 +0000)
commit9d38c4d60ef5bd015e1430386e38d9f32e050f8f
tree4234e8f9e8061e1913600b65d2c04811b610adb8
parent19443a28b7eb74016c956ff74f85c9b0ce162ed5
Fix unclickable checkboxes (#30195) (#30199)

Backport #30195 by @silverwind

Fix https://github.com/go-gitea/gitea/issues/30185, regression from
https://github.com/go-gitea/gitea/pull/30162.

The checkboxes were unclickable because the label was positioned over
the checkbox with `padding`. Now it uses `margin` so the checkbox itself
will be clickable in all cases.

Secondly, I changed the for/id linking to also add missing `for`
attributes when `id` is present. The other way around (only `for`
present) is currently not handled and I think there are likey no
occurences in the code and introducing new non-generated `id`s might
cause problems elsewhere if we do, so I skipped on that.

Co-authored-by: silverwind <me@silverwind.io>
web_src/css/modules/checkbox.css
web_src/js/modules/fomantic/checkbox.js