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

Button hasIconOnly bug with Modal #12205

Closed
NotEntirelySure opened this issue Sep 30, 2022 · 5 comments · Fixed by #12221
Closed

Button hasIconOnly bug with Modal #12205

NotEntirelySure opened this issue Sep 30, 2022 · 5 comments · Fixed by #12221

Comments

@NotEntirelySure
Copy link

There is a bug when using the following Carbon components: Button, DataTable, and Modal. Loading a Button that utilizes the hasIconOnly property into the DataTable seems to be what creates the bug. When the Modal is opened in this configuration, the Button in the DataTable row that utilizes the hasIconOnly is still clickable and has a higher z index than the Modal and the Modal overlay. If the still accessible Button opens a different Modal with its onClick event, opening and then closing the other Modal, will cause the Buttons with the hasIconOnly property to then operate as expected (becoming inaccessible and having a lower z index than the Modal). When the Button is changed to hasIconOnly={false}, the Button then responds as expected (becomes inaccessible and has a lower z index than the Modal). Another thing that causes the Buttons to operate as expected is to change the DataTable property of stickyHeader={false} to stickyHeader={true}. For some reason, when the DataTable is set to having a sticky header, the Buttons loaded into the DataTable rows operate as expected when the Modal opens.
Has_Icon_Only_False_With_Sticky_Header
Has_Icon_Only_No_Sticky_Header
Has_Icon_Only_With_Sticky_Header
HigherZindex

@NotEntirelySure
Copy link
Author

NotEntirelySure commented Sep 30, 2022

Forgot to mention: this bug occurs when using Carbon version 11. It does not occur with Carbon version 10.

@abbeyhrt
Copy link
Contributor

abbeyhrt commented Oct 3, 2022

Hey @NotEntirelySure! Thanks for reporting this bug! This is definitely something we will look into! Would you mind providing more information about the bug you're running into? Like what version of Carbon are you using?

@doggodoge
Copy link

doggodoge commented Oct 4, 2022

Hi folks, I've come across this issue too. It looks like the tooltip on a button with icon only, or IconButton, has a z-index of 9000. This might be the cause of the issue.

Just a bit more information, we are migrating our project from Carbon v10 -> v11. When we open a Modal, every IconButton that we've moved over will draw over the Modal. Opening dev tools I see there's a z-index: 9000 css property applied to all these buttons. When I disable this property, it fixes the issue.

Here's a screenshot of what that looks like:

image

And when I disable this css rule:

image

We get this:

image

Hope this helps 🙂

@tw15egan
Copy link
Member

tw15egan commented Oct 4, 2022

Confirmed, Modal styles are leaking out

Screen Shot 2022-10-04 at 9 17 53 AM

@NotEntirelySure
Copy link
Author

Hey @NotEntirelySure! Thanks for reporting this bug! This is definitely something we will look into! Would you mind providing more information about the bug you're running into? Like what version of Carbon are you using?

@abbeyhrt The version of Carbon I'm using is v11. I was migrating my project from v10 when I noticed this bug with my modals.

@kodiakhq kodiakhq bot closed this as completed in #12221 Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants