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

Tooltip disappears immediately on Android #3582

Closed
kamilchlebek opened this issue Feb 10, 2020 · 3 comments · Fixed by #3587
Closed

Tooltip disappears immediately on Android #3582

kamilchlebek opened this issue Feb 10, 2020 · 3 comments · Fixed by #3587

Comments

@kamilchlebek
Copy link

kamilchlebek commented Feb 10, 2020

Bug description:

NgbTooltip disappears immediately after opening on mobile devices. Same happens when using DevTools with responsive mode enabled.

I got it fixed by enabling wrapAsyncForiOS for everyone.

const wrapAsyncForiOS = fn => iOS ? () => setTimeout(() => fn(), 100) : fn;

Of course I could disable hover trigger, but I'd rather keep if for desktops.

edit: I've found a workaround. Add click at the beginning of default triggers (=> click hover focus)

Link to minimally-working StackBlitz that reproduces the issue:

https://angular-n4vyua.stackblitz.io (forked Quick and easy tooltips demo from docs)

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 8.2.4
ng-bootstrap: 5.2.2

@igorborborema
Copy link

I am working on Angular 11 and ng-tooltip, I am facing this issue at the moment.
First I followed the comment "Add click at the beginning of default" and it worked fine, after that I had mobile and desktop working with tooltip.
Although, in consequence of that, for mobile devices, the first click does not work fine, users have to click for the second time to have the tooltip visible, and then all the next clicks will work properly for the same element.
If user goes to another element, the behaviour will be the same.
Does anyone have similar behaviour of mine ? Thanks

@igorborborema
Copy link

I also tried to use different combinations in order of the triggers:

  • triggers="hover focus click:blur"
  • triggers="hover focus click"
  • triggers="click:blur hover focus "
  • triggers="click hover focus "

@AntoineBrunelle
Copy link

If someone needs it, works for me by doing this :

<span
  triggers="manual"
  #t="ngbTooltip"
  (click)="t.open()"
  ngbTooltip="test"
></span>

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

Successfully merging a pull request may close this issue.

4 participants