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

Title hover before/after show event #350

Open
madprops opened this issue Jun 23, 2023 · 0 comments
Open

Title hover before/after show event #350

madprops opened this issue Jun 23, 2023 · 0 comments

Comments

@madprops
Copy link

madprops commented Jun 23, 2023

I want to propose the addition of 1 or 2 events.
These are regarding the native tooltips that use the title attribute when you hover an element.
I think an event is needed to build a title dynamically without causing needless processing.
In my case I build "timeago", relative times to dates in tooltips, so these have to be calculated every time the title is show. Think "2 minutes ago".
Right now the only way is listening on mouseover of a container and changing the title before it pops up.
This triggers on every element as you move the mouse, lots of events.
Best I can do is use a debouncer to minimize the processing.
If a tooltip event was introduced, I could use it to build the title efficiently every time.
Since it will only be triggered when a tooltip is going to be shown and nothing more.

As you can see other people are looking for it:
https://stackoverflow.com/questions/47314675/is-there-an-event-for-when-the-title-attribute-shows-the-tooltip

Right now I decided to remove dynamic tooltips from my application simply because I'm concerned about the cpu processing happening on basically any mouse movement. If a tooltip or similar event existed I would have no trouble in using it, it would be clean and efficient. Either before-tooltip, or after-tooltip, or both.

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

No branches or pull requests

1 participant