-
Notifications
You must be signed in to change notification settings - Fork 1.5k
wip: enable keyboard scrolling in S2 Popover when content overflows #10091
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
ec0f952
7657f46
58b074e
30b298c
6844600
a0b1ede
9d3725b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,12 +98,13 @@ let popover = style( | |
| default: 'elevated', | ||
| isArrowShown: 'none' | ||
| }, | ||
| outlineStyle: 'solid', | ||
| outlineWidth: 1, | ||
| outlineColor: { | ||
| borderStyle: 'solid', | ||
| borderWidth: 1, | ||
| borderColor: { | ||
| default: lightDark('transparent-white-25', 'gray-200'), | ||
| forcedColors: 'ButtonBorder' | ||
| }, | ||
| outlineStyle: 'none', | ||
| width: { | ||
| size: { | ||
| // Copied from designs, not sure if correct. | ||
|
|
@@ -154,7 +155,8 @@ let popover = style( | |
| isolation: 'isolate', | ||
| pointerEvents: { | ||
| isExiting: 'none' | ||
| } | ||
| }, | ||
| overflow: 'auto' | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. right soooo the only issue with it would be nice to go this route though bc browsers will focus the scrollable container and then users can keyboard up/down so not much code (but then no arrow) we might have to shift focus to the inner div instead to preserve the popover's arrow but not sure how that would play around with submenu's for example
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. allow me to cook for a bit... |
||
| }, | ||
| getAllowedOverrides() | ||
| ); | ||
|
|
@@ -322,7 +324,7 @@ const innerDivStyle = style( | |
| boxSizing: 'border-box', | ||
| outlineStyle: 'none', | ||
| borderRadius: 'inherit', | ||
| overflow: 'auto', | ||
| // overflow: 'auto', | ||
| position: 'relative', | ||
| width: 'full', | ||
| maxSize: 'inherit' | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if there was reason we were using
outlineoverborders. However, sinceoverflow: autowas moved to the popover and not inner div, the outline was appearing on top of the scrollbar. Using border ensures that it appears underneath.*ignore the squished image, i didn't want it take up too much space but you can see where the outline is
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for context, i previously changed the popover to use border instead of outline bc the outline was now rendering on top of the scrollbar since i move
overflow: autoto the outer div. but this caused the popover to shift bc borders participate in the box models whereas outline doesn't. we could move to box shadows but we already haveand i'd rather not mess with it just for this.
are we okay with the outline appearing on top of the scrollbar? or can anyone think of a better solution?
i can't clip the scrollbar to the border radius bc that would require
overflow: hidden' but we needoverflow: auto` so that the outer element gets focused.