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

V5: Tooltip remains visible on top of modal in Chrome for Android #35202

Open
3 tasks done
prietveld opened this issue Oct 14, 2021 · 8 comments
Open
3 tasks done

V5: Tooltip remains visible on top of modal in Chrome for Android #35202

prietveld opened this issue Oct 14, 2021 · 8 comments

Comments

@prietveld
Copy link

Prerequisites

Describe the issue

When an element with a tooltip opens a modal, the tooltip remains visible on top of the modal, even though it should have been hidden by the browser focus moving to the modal element.

The behavior can be observed in the Pen below, in Chrome for Android, or in device emulation mode (touch enabled) on Chrome and Edge for Windows 10.

Reduced test cases

https://codepen.io/PatrickKennisnet/pen/KKvdeLw

What operating system(s) are you seeing the problem on?

Android

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

5.1.1

@prietveld
Copy link
Author

prietveld commented Oct 14, 2021

Screenshots:
image image

@EdwinFajardoBarrera
Copy link

I would like to contribute to this issue

@ffoodd
Copy link
Member

ffoodd commented Dec 14, 2021

To clarify your test case, you're using the tooltip to show something on hover and would like it to be hidden behind the modal?

If so, @GeoSot wouldn't it be a CSS thing related to competitive z-indexes? I can't search for now but this is what it looks like.

@prietveld
Copy link
Author

I would expect the behavior to be the same on mobile / touch as it is on desktop / mouse, which would be the tooltip closing as the modal opens (I assume the desirable behaviour in most use cases). Currently however, the tooltip stays open on mobile / touch, probably due to hover staying on the trigger element even though the modal appeared underneath the cursor.

@zaosoula
Copy link

Here the tooltip has a z-index of 1080 while the modal has 1055

@zaosoula
Copy link

@hanneswylaers
Copy link

hanneswylaers commented Mar 14, 2022

I see similar behaviour when you have a tooltip in a overflow area.
See following codepen for an example: https://codepen.io/hwy/pen/MWrYPej.

How to reproduce?
1: Hover over button
2: The tooltip appears
3: Start scrolling while tooltip is visible
4: Tooltip remains visible when the overflow area appears under/above the subsection & nav

Expected behaviour
On scroll, the tooltip should stay in the overflow area.
They should not be visible when the overflow area scrolls over/under subsections/headers.

Sidenote 1
This was working as expected in Bootstrap 4.4 https://getbootstrap.com/docs/4.4/components/tooltips/

Sidenote 2
The examples on https://popper.js.org/ does seems to have the expected behaviour
https://codesandbox.io/s/github/popperjs/website/tree/master/examples/flipping

Sidenote 3
I initiallly logged this issue on the react-bootstrap repo. To solve it, the z-index of the header got increased. Imo, since it introduces other unwanted side effects, this isn't solving the issue.

@anuragsarma33
Copy link

I am also facing this issue.
The tooltip doesn't get disappear while scrolling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants