Skip to content

Commit 4bbe756

Browse files
committed
Disable auto(in)correct where appropriate
Issue #232
1 parent 7cff79e commit 4bbe756

File tree

8 files changed

+24
-15
lines changed

8 files changed

+24
-15
lines changed

src/components/createtorrentform.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,15 @@ export default function CreateTorrentForm() {
211211
<TextInput
212212
label={"Select file or folder"}
213213
{...form.getInputProps("path")}
214-
styles={{ root: { flexGrow: 1 } }} />
214+
styles={{ root: { flexGrow: 1 } }}
215+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
215216
<Button onClick={onBrowseFile}>File</Button>
216217
<Button onClick={onBrowseDirectory}>Directory</Button>
217218
</Group>
218219
<TextInput
219220
label={"Torrent name"}
220-
{...form.getInputProps("name")} />
221+
{...form.getInputProps("name")}
222+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
221223
<Text fz="sm">Piece size</Text>
222224
<Slider
223225
pt="2.5rem"
@@ -236,7 +238,8 @@ export default function CreateTorrentForm() {
236238
{...form.getInputProps("comment")} />
237239
<TextInput
238240
label={"Source (leave empty unless required by a private tracker)"}
239-
{...form.getInputProps("source")} />
241+
{...form.getInputProps("source")}
242+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
240243
<Checkbox
241244
label="Private torrent"
242245
{...form.getInputProps("private", { type: "checkbox" })} />

src/components/modals/add.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ export function AddMagnet(props: AddCommonModalProps) {
254254
onChange={(e) => { setMagnet(e.currentTarget.value); }}
255255
error={existingTorrent === undefined
256256
? undefined
257-
: "Torrent already exists"} />
257+
: "Torrent already exists"}
258+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
258259
<AddCommon {...common.props} disabled={existingTorrent !== undefined} />
259260
<Divider my="sm" />
260261
<Group position="center" spacing="md">

src/components/modals/common.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ export function TorrentLocation(props: LocationData) {
214214
</ScrollArea.Autosize>
215215
</Menu.Dropdown>
216216
</Menu>
217-
} />
217+
}
218+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
218219
{TAURI && <Button onClick={props.browseHandler} disabled={props.disabled}>Browse</Button>}
219220
</Group>
220221
);

src/components/modals/daemon.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ function DownloadPanel({ form, session }: { form: UseFormReturnType<FormValues>,
9090
<Grid.Col>
9191
<TextInput
9292
label="Default download folder (server setting)"
93-
{...form.getInputProps("session.download-dir")} />
93+
{...form.getInputProps("session.download-dir")}
94+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
9495
</Grid.Col>
9596
<Grid.Col>
9697
<Checkbox
@@ -106,7 +107,8 @@ function DownloadPanel({ form, session }: { form: UseFormReturnType<FormValues>,
106107
<TextInput
107108
label="Path for incomplete files"
108109
{...form.getInputProps("session.incomplete-dir")}
109-
disabled={session["incomplete-dir-enabled"] !== true} />
110+
disabled={session["incomplete-dir-enabled"] !== true}
111+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
110112
</Grid.Col>
111113
<Grid.Col span={6}>
112114
<Checkbox
@@ -317,7 +319,8 @@ function NetworkPanel(
317319
<Grid.Col span={6}>
318320
<TextInput
319321
{...form.getInputProps("session.blocklist-url")}
320-
disabled={session["blocklist-enabled"] !== true} />
322+
disabled={session["blocklist-enabled"] !== true}
323+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
321324
</Grid.Col>
322325
<Grid.Col span={6}>
323326
<Text>Blocklist contains {session["blocklist-size"]} entries</Text>

src/components/modals/settings.tsx

+4-5
Original file line numberDiff line numberDiff line change
@@ -134,26 +134,25 @@ function ServerPanel(props: ServerPanelProps) {
134134
<TextInput
135135
label="Name"
136136
{...props.form.getInputProps(`servers.${props.current}.name`)}
137-
/>
137+
autoCorrect="off" autoCapitalize="off" />
138138

139139
<TextInput
140140
label="Server rpc url"
141141
{...props.form.getInputProps(`servers.${props.current}.connection.url`)}
142142
placeholder="http://1.2.3.4:9091/transmission/rpc"
143-
/>
143+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
144144

145145
<Grid>
146146
<Grid.Col span={6}>
147147
<TextInput
148148
label="User name"
149149
{...props.form.getInputProps(`servers.${props.current}.connection.username`)}
150-
/>
150+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
151151
</Grid.Col>
152152
<Grid.Col span={6}>
153153
<PasswordInput
154154
label="Password"
155-
{...props.form.getInputProps(`servers.${props.current}.connection.password`)}
156-
/>
155+
{...props.form.getInputProps(`servers.${props.current}.connection.password`)} />
157156
</Grid.Col>
158157

159158
<Grid.Col span={12}>

src/components/tables/common.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,8 @@ export function EditableNameField(props: EditableNameFieldProps) {
689689
onBlur={() => { setRenaming(false); }}
690690
onKeyDown={onTextKeyDown}
691691
onClick={(e) => { e.stopPropagation(); }}
692-
onDoubleClick={(e) => { e.stopPropagation(); }} />
692+
onDoubleClick={(e) => { e.stopPropagation(); }}
693+
autoCorrect="off" autoCapitalize="off" spellCheck="false" />
693694
: <Box pl="xs" sx={{ flexGrow: 1, textOverflow: "ellipsis", overflow: "hidden" }}>
694695
{props.currentName}
695696
</Box>}

src/components/tables/filetreetable.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function SearchBox({ setSearchTerms }: {
285285
lineHeight: "1rem",
286286
},
287287
}}
288-
/>
288+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
289289
</Box>
290290
);
291291
}

src/components/toolbar.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ function Toolbar(props: ToolbarProps) {
339339
</ActionIcon>}
340340
onInput={onSearchInput}
341341
styles={{ root: { flexGrow: 1 }, input: { height: "auto" } }}
342+
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false"
342343
/>
343344

344345
<Menu shadow="md" width="12rem" withinPortal middlewares={{ shift: true, flip: true }}>

0 commit comments

Comments
 (0)