Skip to content

Commit

Permalink
feat: [GSW-1976] Disable default input behaviors (autocomplete, spell…
Browse files Browse the repository at this point in the history
…check)
  • Loading branch information
tfrg committed Nov 28, 2024
1 parent ca6d644 commit f36d3ea
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/web/src/components/common/form-input/FormInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const FormInput: FC<Props> = React.forwardRef<HTMLInputElement, Props>((props, r
ref={ref}
onBlur={props?.onBlur}
onWheel={event => (event.target as HTMLElement).blur()}
autoComplete={"off"}
spellCheck={"false"}
/>
{errorText && <div className="error-text">{errorText}</div>}
</FormInputWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ const SearchMenuModal: React.FC<SearchMenuModalProps> = ({
<div ref={menuRef}>
<SearchContainer>
<SearchWrapper>
<InputStyle placeholder={placeholder} value={keyword} onChange={search} />
<InputStyle
placeholder={placeholder}
value={keyword}
onChange={search}
autoComplete={"off"}
spellCheck={"false"}
/>
<IconSearch className="search-icon" />
</SearchWrapper>
</SearchContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ const SearchInput: React.FC<SearchInputProps> = ({
height={height}
className={cx(className, { "empty-status": value === "" })}
>
<InputStyle placeholder={placeholder || t("common:search")} value={value} onChange={onChange} />
<InputStyle
placeholder={placeholder || t("common:search")}
value={value}
onChange={onChange}
autoComplete={"off"}
spellCheck={"false"}
/>
<div className="icon-wrapper">
<IconSearch className="search-icon" />
</div>
Expand Down

0 comments on commit f36d3ea

Please sign in to comment.