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

fix(tooltip): prevent autoclose with default triggers on Android #3587

Conversation

maxokorokov
Copy link
Member

Couldn't find a better alternative at the moment, autoclose needs rethinking...

Fixes #3582

@codecov-io
Copy link

Codecov Report

Merging #3587 into master will not change coverage.
The diff coverage is 50%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3587   +/-   ##
=======================================
  Coverage   91.71%   91.71%           
=======================================
  Files         100      100           
  Lines        2896     2896           
  Branches      533      534    +1     
=======================================
  Hits         2656     2656           
  Misses        183      183           
  Partials       57       57
Flag Coverage Δ
#e2e 56.56% <50%> (-0.04%) ⬇️
#unit 88.49% <50%> (ø) ⬆️
Impacted Files Coverage Δ
src/util/autoclose.ts 91.66% <50%> (-0.34%) ⬇️
src/rating/rating.ts 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59581c7...63083d6. Read the comment docs.

@maxokorokov maxokorokov merged commit 04d8552 into ng-bootstrap:master Feb 13, 2020
iOS = !!navigator.userAgent && /iPad|iPhone|iPod/.test(navigator.userAgent);
}
const isMobile = () => typeof navigator !== 'undefined' ?
!!navigator.userAgent && /iPad|iPhone|iPod|Android/.test(navigator.userAgent) :

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this won't work for iPads with iOS >= 13. Since this version userAgent does not contain iPad.

https://stackoverflow.com/questions/2153877/what-is-the-ipad-user-agent/56923008#56923008

I checked it on browserstack and I can confirm that the issue still persists. This commit did the fix for Android though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes, thanks for the info. Of course we should not use userAgent at all for this...

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

Successfully merging this pull request may close these issues.

Tooltip disappears immediately on Android
3 participants