Skip to content

Commit

Permalink
Disable auto(in)correct where appropriate
Browse files Browse the repository at this point in the history
Issue #232
  • Loading branch information
qu1ck committed Oct 14, 2024
1 parent 7cff79e commit 4bbe756
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 15 deletions.
9 changes: 6 additions & 3 deletions src/components/createtorrentform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,15 @@ export default function CreateTorrentForm() {
<TextInput
label={"Select file or folder"}
{...form.getInputProps("path")}
styles={{ root: { flexGrow: 1 } }} />
styles={{ root: { flexGrow: 1 } }}
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
<Button onClick={onBrowseFile}>File</Button>
<Button onClick={onBrowseDirectory}>Directory</Button>
</Group>
<TextInput
label={"Torrent name"}
{...form.getInputProps("name")} />
{...form.getInputProps("name")}
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
<Text fz="sm">Piece size</Text>
<Slider
pt="2.5rem"
Expand All @@ -236,7 +238,8 @@ export default function CreateTorrentForm() {
{...form.getInputProps("comment")} />
<TextInput
label={"Source (leave empty unless required by a private tracker)"}
{...form.getInputProps("source")} />
{...form.getInputProps("source")}
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
<Checkbox
label="Private torrent"
{...form.getInputProps("private", { type: "checkbox" })} />
Expand Down
3 changes: 2 additions & 1 deletion src/components/modals/add.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ export function AddMagnet(props: AddCommonModalProps) {
onChange={(e) => { setMagnet(e.currentTarget.value); }}
error={existingTorrent === undefined
? undefined
: "Torrent already exists"} />
: "Torrent already exists"}
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
<AddCommon {...common.props} disabled={existingTorrent !== undefined} />
<Divider my="sm" />
<Group position="center" spacing="md">
Expand Down
3 changes: 2 additions & 1 deletion src/components/modals/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ export function TorrentLocation(props: LocationData) {
</ScrollArea.Autosize>
</Menu.Dropdown>
</Menu>
} />
}
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
{TAURI && <Button onClick={props.browseHandler} disabled={props.disabled}>Browse</Button>}
</Group>
);
Expand Down
9 changes: 6 additions & 3 deletions src/components/modals/daemon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ function DownloadPanel({ form, session }: { form: UseFormReturnType<FormValues>,
<Grid.Col>
<TextInput
label="Default download folder (server setting)"
{...form.getInputProps("session.download-dir")} />
{...form.getInputProps("session.download-dir")}
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
</Grid.Col>
<Grid.Col>
<Checkbox
Expand All @@ -106,7 +107,8 @@ function DownloadPanel({ form, session }: { form: UseFormReturnType<FormValues>,
<TextInput
label="Path for incomplete files"
{...form.getInputProps("session.incomplete-dir")}
disabled={session["incomplete-dir-enabled"] !== true} />
disabled={session["incomplete-dir-enabled"] !== true}
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
</Grid.Col>
<Grid.Col span={6}>
<Checkbox
Expand Down Expand Up @@ -317,7 +319,8 @@ function NetworkPanel(
<Grid.Col span={6}>
<TextInput
{...form.getInputProps("session.blocklist-url")}
disabled={session["blocklist-enabled"] !== true} />
disabled={session["blocklist-enabled"] !== true}
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
</Grid.Col>
<Grid.Col span={6}>
<Text>Blocklist contains {session["blocklist-size"]} entries</Text>
Expand Down
9 changes: 4 additions & 5 deletions src/components/modals/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,26 +134,25 @@ function ServerPanel(props: ServerPanelProps) {
<TextInput
label="Name"
{...props.form.getInputProps(`servers.${props.current}.name`)}
/>
autoCorrect="off" autoCapitalize="off" />

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

<Grid>
<Grid.Col span={6}>
<TextInput
label="User name"
{...props.form.getInputProps(`servers.${props.current}.connection.username`)}
/>
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
</Grid.Col>
<Grid.Col span={6}>
<PasswordInput
label="Password"
{...props.form.getInputProps(`servers.${props.current}.connection.password`)}
/>
{...props.form.getInputProps(`servers.${props.current}.connection.password`)} />
</Grid.Col>

<Grid.Col span={12}>
Expand Down
3 changes: 2 additions & 1 deletion src/components/tables/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ export function EditableNameField(props: EditableNameFieldProps) {
onBlur={() => { setRenaming(false); }}
onKeyDown={onTextKeyDown}
onClick={(e) => { e.stopPropagation(); }}
onDoubleClick={(e) => { e.stopPropagation(); }} />
onDoubleClick={(e) => { e.stopPropagation(); }}
autoCorrect="off" autoCapitalize="off" spellCheck="false" />
: <Box pl="xs" sx={{ flexGrow: 1, textOverflow: "ellipsis", overflow: "hidden" }}>
{props.currentName}
</Box>}
Expand Down
2 changes: 1 addition & 1 deletion src/components/tables/filetreetable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ function SearchBox({ setSearchTerms }: {
lineHeight: "1rem",
},
}}
/>
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" />
</Box>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/components/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ function Toolbar(props: ToolbarProps) {
</ActionIcon>}
onInput={onSearchInput}
styles={{ root: { flexGrow: 1 }, input: { height: "auto" } }}
autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false"
/>

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

0 comments on commit 4bbe756

Please sign in to comment.