12 Jan 2024 |
kirillsemyonkin | that way all modal logic would be not floating around in App but rather be contained inside of this simple passthrough component | 21:13:47 |
dementeddddd | damn i think it worked | 21:14:01 |
dementeddddd | alr then | 21:20:26 |
dementeddddd | now i have to figure out how to close it lmfao | 21:21:01 |
dementeddddd | would be good to close on esc and click outside of modal | 21:21:14 |
dementeddddd | and how to make it so that the background cant be scrolled | 21:21:37 |
kirillsemyonkin | what background? | 21:21:44 |
dementeddddd | i would have to add overflow: hidden to the body right | 21:21:47 |
dementeddddd | well just my page | 21:21:50 |
kirillsemyonkin | anything behind when modal is open? | 21:21:58 |
dementeddddd | yes | 21:23:50 |
dementeddddd | no scrolling the page just the modal if theres enough content | 21:23:58 |
kirillsemyonkin | i wonder if pointer-events: none css on the modal does that | 21:24:04 |
dementeddddd | doesnt | 21:24:08 |
kirillsemyonkin | actually no idea if that would break every single mouse event lol | 21:24:13 |
kirillsemyonkin | you can cancel scroll events on the modal | 21:24:18 |
kirillsemyonkin | or something | 21:24:25 |
dementeddddd | i can actually completely interact with the background | 21:24:31 |
dementeddddd | like i can hover over items | 21:24:38 |
dementeddddd | thats probably some css stuff | 21:24:43 |
kirillsemyonkin | i would have modal be styled like a fullscreen overlay, so that events dont get behind it, and modal-content be a small window inside it | 21:24:49 |
dementeddddd | yea thats what i have | 21:24:55 |
dementeddddd | .modal is a dimmed blurred background | 21:25:01 |
dementeddddd | but i can still click and hover over items in the back | 21:25:11 |
dementeddddd | its display: block | 21:25:16 |
kirillsemyonkin | Download image.png | 21:26:28 |
kirillsemyonkin | Download image.png | 21:26:29 |
kirillsemyonkin | Download image.png | 21:26:30 |
kirillsemyonkin | im not sure if i block any events, but i have pointer-events: initial; when its open actually, and i have this small thing to do the click-to-close | 21:26:31 |
kirillsemyonkin | * im not sure if i block any events, but i have pointer-events: initial; when its open actually, and i have this small thing to do the click-outsided-to-close | 21:26:33 |