Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sheet is not reopening in desktop Chrome #144

Open
bamnenim-kryptonium opened this issue Nov 10, 2023 · 4 comments
Open

Sheet is not reopening in desktop Chrome #144

bamnenim-kryptonium opened this issue Nov 10, 2023 · 4 comments

Comments

@bamnenim-kryptonium
Copy link

Environment: Windows, chrome Version 119.0.6045.107

The sheet can not be re-opened once it is closed.

react-modal-sheet

the issue is reproducible in the example page and in the code sandbox i created here

@younes0
Copy link

younes0 commented Nov 13, 2023

@Temzasse @bamnenim-kryptonium happens since always and on all demos

@younes0
Copy link

younes0 commented Nov 13, 2023

workaround

import { PropsWithChildren } from "react";
import Sheet from "react-modal-sheet";

interface Props extends PropsWithChildren {
  isOpen: boolean;
  setIsOpen: (isOpen: boolean) => void;
}

const BottomSheet = ({ children, isOpen, setIsOpen }: Props) => (
  <Sheet
    isOpen={isOpen}
    onClose={() => setIsOpen(false)}
    style={{
      zIndex: isOpen ? "9999999" : "-1",
      visibility: isOpen ? "visible" : "hidden",
    }}
  >
    <Sheet.Container>
      <Sheet.Content>{children}</Sheet.Content>
    </Sheet.Container>
  </Sheet>
);

export default BottomSheet;

@sharpsteelsoftware
Copy link

Also in Chrome if you use the Scroller and start to drag down, but not enough to actually dismiss the dialog, then the dialog will be frozen in a display space and unable to interact with site.

@evist0
Copy link

evist0 commented May 31, 2024

This seems to relate to this issue.

Sheet does not reopen only when using prefers reduce motion, which causes the values ​​to change too quickly and AnimatePresence starts to glitch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants