Skip to content

Commit 0520714

Browse files
authored
fix: set label text not selectable to improve input focus usability (#120)
* fix: set input label text not selectable to improve input focus usability * fix: set label text not selectable for toggle label
1 parent 42a3fc2 commit 0520714

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/cosmoz-toggle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export const toggleStyles = css`
7575
font-size: 14px;
7676
line-height: 18px;
7777
cursor: pointer;
78+
user-select: none;
7879
}
7980
.toggle[disabled] {
8081
opacity: 0.6;

src/styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export const styles = css`
109109
text-overflow: ellipsis;
110110
text-transform: var(--cosmoz-input-label-text-transform);
111111
font-weight: var(--cosmoz-input-label-font-weight);
112+
user-select: none;
112113
}
113114
114115
.wrap:has(#input:not(:placeholder-shown)) {

0 commit comments

Comments
 (0)