question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Focus / Blur Events

See original GitHub issue

Right now the plugin supports click, right-click, hover events.

I don’t see any specific callback/methods to enable / turn-on / turn off the tooltip from outside, or the ability to define a trigger="focus" which should support both click+focus.

If you want this to be accessible, having the ability to tab through and it shows automatically is fantastic, and especially with enter/escape functionality.

I’m currently building a tab-through list of dl/dt/dd elements which each of their own definitions. Being able to tab through these and focus on each item w/ it’s tooltip would be quite useful.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
denisborovikovcommented, Mar 28, 2019

@robertkraig Here’s quick rewrite with react class component https://codesandbox.io/s/jj3rm0nnmw

2reactions
denisborovikovcommented, Mar 26, 2019

Hi, just use tooltip as a controlled component.

Here’s a rough example of how you can implement required behavior https://codesandbox.io/s/mm3klvjjjx

Use tab to switch the focus between buttons. When you focus on the middle button, tooltip shows. When the button lost the focus, it hides.

You can use tooltipShown and onVisibilityChange to control the appearance of the tooltip from the outside. See README and controlled example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Focusing: focus/blur - The Modern JavaScript Tutorial
The focus event is called on focusing, and blur – when the element loses the focus. Let's use them for validation of an...
Read more >
onblur Event - W3Schools
The onblur event occurs when an element loses focus. The onblur event is often used on input fields. The onblur event is often...
Read more >
Focusing: focus/blur | W3docs JavaScript Tutorial
The focus and blur events are a crucial part of any programming activity. The focus event triggers on focusing, while the blur event...
Read more >
JavaScript Focus and Blur Events - Linux Hint
Events that occur when an element gains or loses its focus are referred to as JavaScript focus and blur events. Events that are...
Read more >
Understand Focus And Blur Event - YouTube
Understand Focus And Blur Event - Advanced JavaScript Tutorial Part - 64Learn More From Our Website:-www.dailywebtuition.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found