-
Notifications
You must be signed in to change notification settings - Fork 16
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
Modal: Y Scrollbar region always present when using a mouse #826
Comments
🤔 This doesn't happen in the storybook examples that I can see. I wonder if something on the css of that page it making it think that the content is overflowing the modal even though it doesn't look like it. |
@brentswisher do you have a mouse plugged in? There are some mac level settings that can also affect this |
Hmm, interesting. I do have a Magic Mouse connected via Bluetooth. My settings match what you have selected. |
I vaguely remembered a similar conversation and it looks like this maybe came up once before in #531 but was deemed out of scope - not that it shouldn't be looked into, but just as additional info. Are you using a wired mouse? |
@michael-iden @brentswisher as mentioned this has been raised in the past (offline as well) and we have closed citing the macOS-level settings as the fix. I believe that if a user has a mouse plugged in such that the Pharos modal shows this scroll bar, they would have a similar experience regularly on other sites across the web as well. |
I am using a wired, generic Dell mouse. And possibly due to the magic mouse having touchpad-like capabilities, that prevents the scroll regions from appearing, although I don't know exactly why that is deemed different than a physical scroll wheel? Whether the scroll region appears also depends what overflow behavior is. If we have Furthermore, it looks like if the modal would possibly overflow, the whole modal including the overlay scrolls, not just the contents of the modal. Screen.Recording.2024-10-28.at.9.22.22.AM.mov |
Right—this is kind of what we'd established in past looks at this.
This one might be something I noticed recently too and am surprised by; I would maybe expect the covered content not to scroll, but I might also remember some discussion around this from an a11y standpoint that I'd need to dig to find. |
Talked more with @daneah and we will remove |
Could you restate a little of that conversation here? It seems like we want the modal to overflow, not the content behind the modal? It feels like that is a bug to me (and potentially an a11y issue), it that the desired effect? |
Right now #827 is feeling a little like updating our UI to match a bug, instead of resolving the underlying issue, so just trying to understand the thought process there, its very possible I am missing some piece of it though. |
@brentswisher essentially the modal currently expands to meet the height of its content, and the content does not scroll at all—rather, the modal acts a little like a sheet, and scrolling pulls the part of the sheet that's off-screen further up. So removing the |
I can add this to the next pharos ops discussion so we can look at the various considerations with the designers and accessibility experts. Even if we did change the scrolling/overflow behavior more to what you describe, I posit that |
Ah, that makes more sense, thank you. I would be fine with moving forward with removing it. I do still worry that we have a bug still here somewhere, as I don't think this should be possible, where the content scrolls behind the modal: But, that's maybe a separate thing. |
Expected behavior
Scrollbar region only is shown only when necessary based off the contents of the modal overflowing
Actual behavior
Y Scrollbar region always present when a mouse input device is present
Steps to reproduce the issue
Screenshots or code
Pharos version
14.4.0
Your environment
Additional information
https://github.com/ithaka/pharos/blob/develop/packages/pharos/src/components/modal/pharos-modal.scss#L98
The text was updated successfully, but these errors were encountered: