-
Notifications
You must be signed in to change notification settings - Fork 77
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
Tooltip appears above modal overlay #5388
Comments
This is caused by our predefined z-index layer values where tooltip uses a popup z-index value of 999 and modal and its overlay use 700 and 800, respectively. As a workaround, you could apply a z-index of 1000 to @macandcheese @ashetland @SkyeSeitz @driskull Do we to tweak the z-index used by tooltips (and other floating-ui components) to use the same as modal? |
That might be the best thing to do. If a tooltip is inside a modal it should still appear above the modal right? |
That was going to be my question as well, can a tooltip be invoked inside a modal and how would the z-index affect that? One thing I noticed in the example was that I expected the Tooltip to dismiss as soon as the Modal opened. That might be another way to solve this, but I'm not sure about feasibility. |
I'd agree yes |
Making the tooltip/popover the same zIndex as the overlay doesn't seem to work because when you put a tooltip inside the modal it wont' display. This is because the modal is positioned fixed. I think the best solution is to allow a user to set the zIndex of a component using a CSS variable for cases like this. |
**Related Issue:** #5388 ## Summary fix(tooltip): Prevent tooltip from appearing above modal overlay. #5388 - Updates floating-ui to use tailwind configuration - Sets default z-index to be that of a dropdown - Adds ability for users to customize zindex of tooltips and popovers - CSS vars `--calcite-tooltip-z-index` and `--calcite-popover-z-index` ```html <calcite-tooltip style="--calcite-tooltip-z-index: 500;" label="Open modal" reference-element="button"> Open modal </calcite-tooltip> ```
Installed and assigned for verification. |
Verified on For instance: <calcite-tooltip style="--calcite-tooltip-z-index: 300;" label="Open modal" reference-element="button">
Open modal</calcite-tooltip> |
Actual Behavior
If a tooltip is visible when a modal appears, the tooltip is layered above the modal's background overlay.
Expected Behavior
The tooltip is layered below the overlay.
Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/eYryBbY
Reproduction Steps
Reproduction Version
beta.94
Relevant Info
Field Maps has many icon-only buttons with tooltips (e.g. delete map, copy map, etc...) that launch modals.
Regression?
No response
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: