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.

Feature: Broadcast focus state

See original GitHub issue

Hello!

I’m working with Lexical at the moment, and have a fully working editor all set up and working. However, I’ve had a request from my UX team to show a focus ring around the editor; this currently doesn’t seem possible, as the editor does not broadcast focus/blur events.

The best I can manage at the moment is an outline around the editor “inner” using the :focus-within CSS selector, but this isn’t as clean as we’d like: image

Would something like a focus hook, or an editor.isFocused boolean be possible? Anything I could use to add/remove a class based on state would be ideal!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
trueadmcommented, Nov 3, 2022

@mattvb91 If you look at the event target or relatedTarget and seeing if that gives you any signal to help you?

0reactions
mattvb91commented, Nov 3, 2022

@mattvb91 If you look at the event target or relatedTarget and seeing if that gives you any signal to help you?

spot on! Thank you, appreciated

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use the focus state to improve your TV App - Bootcamp
Hover — Use when the users cursor or focus is currents located on the UI element. Only for curser based navigation. Focused —...
Read more >
Focus and selection - Inputs - Human Interface Guidelines
In tvOS, focusable items can have up to five different states, each of which is visually distinct. Because focusing an item often increases...
Read more >
Radio Group Example Using Roving tabindex | APG | WAI - W3C
This example implements the features of the Radio Group Design ... If the radio button with focus is not checked, changes the state...
Read more >
Focus Features - Wikipedia
Focus Features LLC is an American film production and distribution company, owned by Comcast ... Features distributes independent and foreign films in the...
Read more >
Using focus mode - Zoom Support
This feature gives the host and co-hosts view of all participants' videos without other participants seeing each other. This extends into screen sharing,...
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