Skip to content

Commit 33aa4da

Browse files
committed
fix: disable all autocompletes on inputs
1 parent a3ae197 commit 33aa4da

9 files changed

Lines changed: 17 additions & 20 deletions

File tree

app/components/ConnectorModal.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ watch(open, isOpen => {
162162
type="password"
163163
name="connector-token"
164164
:placeholder="$t('connector.modal.token_placeholder')"
165-
autocomplete="off"
166-
spellcheck="false"
165+
v-bind="noCorrect"
167166
class="w-full px-3 py-2 font-mono text-sm bg-bg-subtle border border-border rounded-md text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
168167
/>
169168
</div>

app/components/OrgMembersPanel.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ watch(lastExecutionTime, () => {
327327
type="search"
328328
name="members-search"
329329
:placeholder="$t('org.members.filter_placeholder')"
330-
autocomplete="off"
330+
v-bind="noCorrect"
331331
class="w-full pl-7 pr-2 py-1.5 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
332332
/>
333333
</div>
@@ -512,8 +512,7 @@ watch(lastExecutionTime, () => {
512512
type="text"
513513
name="new-member-username"
514514
:placeholder="$t('org.members.username_placeholder')"
515-
autocomplete="off"
516-
spellcheck="false"
515+
v-bind="noCorrect"
517516
class="w-full px-2 py-1.5 font-mono text-sm bg-bg border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
518517
/>
519518
<div class="flex items-center gap-2">

app/components/OrgTeamsPanel.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ watch(lastExecutionTime, () => {
296296
type="search"
297297
name="teams-search"
298298
:placeholder="$t('org.teams.filter_placeholder')"
299-
autocomplete="off"
299+
v-bind="noCorrect"
300300
class="w-full pl-7 pr-2 py-1.5 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
301301
/>
302302
</div>
@@ -453,8 +453,7 @@ watch(lastExecutionTime, () => {
453453
type="text"
454454
:name="`add-user-${teamName}`"
455455
:placeholder="$t('org.teams.username_placeholder')"
456-
autocomplete="off"
457-
spellcheck="false"
456+
v-bind="noCorrect"
458457
class="flex-1 px-2 py-1 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
459458
/>
460459
<button
@@ -510,8 +509,7 @@ watch(lastExecutionTime, () => {
510509
type="text"
511510
name="new-team-name"
512511
:placeholder="$t('org.teams.team_name_placeholder')"
513-
autocomplete="off"
514-
spellcheck="false"
512+
v-bind="noCorrect"
515513
class="flex-1 px-2 py-1.5 font-mono text-sm bg-bg border border-border rounded-r text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
516514
/>
517515
</div>

app/components/PackageListControls.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const showFilteredCount = computed(() => {
6666
v-model="filterValue"
6767
type="search"
6868
:placeholder="placeholder ?? $t('package.list.filter_placeholder')"
69-
autocomplete="off"
69+
v-bind="noCorrect"
7070
class="w-full bg-bg-subtle border border-border rounded-lg pl-10 pr-4 py-2 font-mono text-sm text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:(border-border-hover outline-none)"
7171
/>
7272
</div>

app/components/PackageMaintainers.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ watch(
227227
type="text"
228228
name="add-owner-username"
229229
:placeholder="$t('package.maintainers.username_placeholder')"
230-
autocomplete="off"
231-
spellcheck="false"
230+
v-bind="noCorrect"
232231
class="flex-1 px-2 py-1 font-mono text-sm bg-bg-subtle border border-border rounded text-fg placeholder:text-fg-subtle transition-colors duration-200 focus:border-border-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
233232
/>
234233
<button

app/components/UserCombobox.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ const prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)')
145145
type="text"
146146
:placeholder="placeholder ?? $t('user.combobox.default_placeholder')"
147147
:disabled="disabled"
148-
autocomplete="off"
149-
spellcheck="false"
148+
v-bind="noCorrect"
150149
role="combobox"
151150
aria-autocomplete="list"
152151
:aria-expanded="isOpen && (filteredSuggestions.length > 0 || showNewUserHint)"

app/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ defineOgImageComponent('Default')
6666
type="search"
6767
name="q"
6868
:placeholder="$t('search.placeholder')"
69-
autocomplete="off"
69+
v-bind="noCorrect"
7070
autofocus
7171
class="w-full bg-bg-subtle border border-border rounded-lg pl-8 pr-24 py-4 font-mono text-base text-fg placeholder:text-fg-subtle transition-all duration-300 focus:(border-accent outline-none)"
7272
@input="handleSearch"

app/pages/search.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -729,10 +729,7 @@ defineOgImageComponent('Default', {
729729
type="search"
730730
name="q"
731731
:placeholder="$t('search.placeholder')"
732-
autocapitalize="off"
733-
autocomplete="off"
734-
autocorrect="off"
735-
spellcheck="false"
732+
v-bind="noCorrect"
736733
class="w-full max-w-full bg-bg-subtle border border-border rounded-lg pl-8 pr-10 py-3 font-mono text-base text-fg placeholder:text-fg-subtle transition-colors duration-300 focus:border-accent focus-visible:outline-none appearance-none"
737734
@focus="isSearchFocused = true"
738735
@blur="isSearchFocused = false"

app/utils/input.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export const noCorrect = {
2+
autocapitalize: 'off',
3+
autocomplete: 'off',
4+
autocorrect: 'off',
5+
spellcheck: 'false',
6+
} as const

0 commit comments

Comments
 (0)