Skip to content

Commit

Permalink
Remove autoFocus on StyledSearchInput
Browse files Browse the repository at this point in the history
  • Loading branch information
toddkao committed Jan 30, 2025
1 parent a4fa4aa commit 301fbf7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion packages/widget/src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const GhostButton = styled(SmallText).attrs({

export const Button = styled.button<FlexProps>`
${removeButtonStyles}
line - height: initial;
line-height: initial;
${({ disabled }) =>
disabled
? css`
Expand Down
3 changes: 0 additions & 3 deletions packages/widget/src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ export const Modal = ({ children, drawer, container, onOpenChange, theme }: Moda
const prevOverflowStyle = getComputedStyle(document.body).overflow;
setPrevOverflowStyle(prevOverflowStyle);
document.body.style.overflow = "hidden";
setTimeout(() => {
window.scrollTo(0, scrollPos);
}, 10);

window.addEventListener("keydown", handleKeyDown);
window.addEventListener("click", handleClickOutside);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export const AssetAndChainSelectorModalSearchInput = ({

<StyledSearchInput
ref={inputRef}
autoFocus
style={{ paddingLeft: asset ? undefined : 30 }}
type="text"
placeholder={asset ? "Search networks" : "Search for an asset"}
Expand Down

0 comments on commit 301fbf7

Please sign in to comment.