Skip to content

Commit f5ed2ea

Browse files
committed
fix: clicking on label whitespace no longer focuses input
Clicking on the label itself still works. BREAKING CHANGE: The label whitespace fix is a breaking change because it changes the layout of the label. Style top no longer automatically does w-full. You must place an additional <div class="flex-1"/> after the label. The top style will probably be removed in the future.
1 parent dd55c28 commit f5ed2ea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/LibInput/LibInput.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
{{ label }}
2727
</slot>
2828
</lib-label>
29+
<!-- Allow blurring when clicking the blank part of a label. -->
30+
<div class="flex-1"/>
2931
</slot>
3032
<!-- These are mostly copies of the classes on LibSimpleInput except made to work with disabled/readonly/etc manually since a div cannot have these states. -->
3133
<div
@@ -39,7 +41,7 @@
3941
relative
4042
flex
4143
flex-1
42-
basis-[max-content]
44+
basis-[100%]
4345
flex-wrap
4446
rounded
4547
gap-2

src/components/LibLabel/LibLabel.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
border-transparent
88
`,
99
type === 'top' && `
10-
w-full
1110
pr-0
1211
text-sm
1312
`,

0 commit comments

Comments
 (0)