Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(forms): stop checkbox label clicks from opening the helper tooltip

Andras Bacsai56c427b67158
diff --git a/resources/views/components/forms/checkbox.blade.php b/resources/views/components/forms/checkbox.blade.php
index 8f4933200a..863eed8f5c 100644
--- a/resources/views/components/forms/checkbox.blade.php
+++ b/resources/views/components/forms/checkbox.blade.php
@@ -16,7 +16,8 @@
'cursor-pointer hover:bg-neutral-100/80 dark:hover:bg-white/[0.035]' => !$disabled,
'opacity-55' => $disabled,
])>
- <label @class([
+ {{-- explicit "for": otherwise the label forwards clicks to its first labelable child, the helper button --}}
+ <label for="{{ $htmlId }}" @class([
'label flex w-full max-w-full min-w-0 items-center gap-3 px-0',
'cursor-pointer' => !$disabled,
'cursor-not-allowed' => $disabled,