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 on focus #1313

Closed
AchimStuy opened this issue Sep 16, 2020 · 4 comments
Closed

Tooltip on focus #1313

AchimStuy opened this issue Sep 16, 2020 · 4 comments
Labels
Type: Feature ⚙ Request or idea for a new feature.
Milestone

Comments

@AchimStuy
Copy link

Is your feature request related to a problem? Please describe.
Bootstrap offers option to show Tooltip triggered by focus. How can this be done with Blazorize?

Describe the solution you'd like
Tooltip has a Property Trigger of flags enum type TooltipTrigger which can be hover, focus or both (default hover).

Alternative solution
Provide Methods Show() and Hide() to Tooltip, which could be called manually in a focus-EventHandler. Currently I set AlwaysActive, but I get warning "Component parameter 'AlwaysActive' should not be set outside of its component."

@AchimStuy
Copy link
Author

I could also implement it and create PR if you explain me, where to implement. :)

@stsrki
Copy link
Collaborator

stsrki commented Sep 16, 2020

Seems like a cool feature to have. In case you're going to implement I think you need to focus on code in Blazorise\Styles\_positions.scss. Notice the usage of SCSS. To compile it into CSS you will need to install VS extension called Web Compiler: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebCompiler

Other than that you will have to probably create separate CSS classes for each of the enums and then apply them in BuildClasses in Tooltip.razor.cs.

@AchimStuy
Copy link
Author

Much easier: For me it would be enough to add the pseudo-classes &:focus-within::before and &:focus-within::after to the _positions.scss\@mixin tooltip-hover. Then Tooltip would be triggered also on every focus-within. (It is already triggered by focus of the tooltip - maybe a bug?) In my opinion it would make sense to be also triggered by focus-within. (I need it to go through the inputs of a form via Tabulator - there hover is useless.)

Do you want to add this or shall I and create PR or should we create the complex behavior proposed in the first post?

@stsrki stsrki added this to the 0.9.4 milestone Apr 7, 2021
@stsrki stsrki added the Type: Feature ⚙ Request or idea for a new feature. label Apr 7, 2021
@stsrki
Copy link
Collaborator

stsrki commented Apr 7, 2021

Should be a lot easier with the new tooltip. Going on the list.

This was referenced Apr 13, 2021
@stsrki stsrki closed this as completed Apr 13, 2021
@stsrki stsrki moved this to ✔ Done in Development Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
Archived in project
Development

No branches or pull requests

2 participants