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

feat(tooltip): trigger tooltips with hover and focus by default #3022

Closed
bastienmoulia opened this issue Feb 13, 2019 · 4 comments
Closed

feat(tooltip): trigger tooltips with hover and focus by default #3022

bastienmoulia opened this issue Feb 13, 2019 · 4 comments

Comments

@bastienmoulia
Copy link
Contributor

Don't know if it's an oversight or if it's the right way to do it, but in Bootstrap the tooltips are triggered by hover and focus, and ng-boostrap use only the hover.

https://getbootstrap.com/docs/4.3/components/tooltips/#options
VS
https://ng-bootstrap.github.io/#/components/tooltip/api

@mendeza
Copy link

mendeza commented Feb 13, 2019 via email

@maxokorokov
Copy link
Member

Indeed looks like the default value should be: "hover focus"

A quick test shows that "hover focusin:focusout" works fine.
We don't have a "focus" alias in the triggers.ts, so it should be added there to allow for "hover focus" to work

P.S. popover should stay with "click" as default

@maxokorokov
Copy link
Member

maxokorokov commented Feb 14, 2019

This should be an easy PR, but if anybody wants to work on this, please add an e2e test for focus handling here → https://github.com/ng-bootstrap/ng-bootstrap/tree/master/e2e-app/src/app/tooltip

@hasegao
Copy link
Contributor

hasegao commented Feb 14, 2019

It looks pretty straightforward updating the Tooltip default to "hover focus" in the tooltip config, and adding "focus" alias to triggers.ts

Will submit a PR alone with e2e test as mentioned.

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

4 participants