Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
littlebtc committed Jun 15, 2024
1 parent af7e5b0 commit 3fe178d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/common/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ const Search = () => {
<Input placeholder="搜尋玩家暱稱..." />
</div>
<FieldError>{hasError ? "搜尋發生錯誤。" : undefined}</FieldError>
<Popover>
<Popover
ref={(ref) =>
// https://github.com/adobe/react-spectrum/issues/1513
ref?.addEventListener("touchend", (e) => e.preventDefault())
}
>
<ListBox>
{(section: (typeof options)[number]) => (
<Section id={section.id}>
Expand Down
7 changes: 6 additions & 1 deletion src/common/components/UserBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ const UserBoxComponent = () => {
<Fragment>
<DialogTrigger>
<Button>登入</Button>
<Popover>
<Popover
ref={(ref) =>
// https://github.com/adobe/react-spectrum/issues/1513
ref?.addEventListener("touchend", (e) => e.preventDefault())
}
>
<Dialog className={clsx("react-aria-Dialog", classes["dialog"])}>
<Alert severity="warning">
<p>Facebook 登入將於 7/15 停止運作。</p>
Expand Down
11 changes: 10 additions & 1 deletion src/dx_intl/pages/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,12 @@ const Player = ({ params }: { params: Params }) => {
<IconArrowDropDown />
</span>
</Button>
<Popover>
<Popover
ref={(ref) =>
// https://github.com/adobe/react-spectrum/issues/1513
ref?.addEventListener("touchend", (e) => e.preventDefault())
}
>
<ListBox>
<Section>
<Header>譜面</Header>
Expand Down Expand Up @@ -527,6 +532,10 @@ const Player = ({ params }: { params: Params }) => {
</Tabs>
</div>
<Popover
ref={(ref) =>
// https://github.com/adobe/react-spectrum/issues/1513
ref?.addEventListener("touchend", (e) => e.preventDefault())
}
triggerRef={ratingPopRef}
isOpen={!!ratingPopEntry}
onOpenChange={(o) => {
Expand Down

0 comments on commit 3fe178d

Please sign in to comment.