-
Notifications
You must be signed in to change notification settings - Fork 52
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
feature to log history of focus changes #39
Comments
Thanks for sharing with us @moizgh! Here are couple of ideas that might help in this case:
Does this help? I like the idea of tracking history so you can go back later and jump into the code. But I'm wondering if these 2 tips are enough already? |
I've used the above before to track focus, and while it does help to show /what/ has focus, it is still quite difficult to determine /why/ something has focus (in some cases like with a FocusTrapZone, or if there is an iframe in the middle of content focus can get passed around quite a bit). Focus is often very important for keeping content accessible so having a tool like this would be great to help debug more complex focus issues! |
So capturing the event handler that caused focus to go somewhere would be helpful, right? |
Yeah, the ideal (not sure how much work this would be) would be:
|
Interesting idea related to this. It doesn't solve the problem, but is a good simple step in the right direction: https://twitter.com/jpzwarte/status/1514890537198837761
|
@captainbrosset I've used the live expression trick, but it doesn't work x-browser (Safari at least). And it's something you have to do manually (as opposed to a "focus" badge). Also when working with web components, you can't do |
Very good points! Thank you Jeroen for joining in on the discussion. From what I heard so far:
|
One of the biggest frustrations for me is figuring out what keeps stealing focus all the time! :)
It would be great if there is a devtools feature that can enable capturing a history of focus transition in the DOM. Knowing the sequences of transition would make it so much easier to pin-point the source code / event handler / relevant components to investigate. Usually, figuring out which event handler to set the breakpoint in is the most time-consuming activity and a feature like this may make things a lot quicker.
AB#39079675
The text was updated successfully, but these errors were encountered: