Sometimes you find yourself trying to identify a weird bug in a piece of UI and often DevTools comes to the rescue to help you out.
I was experiencing an issue this week where a UI element wouldn’t click and get focus without pressing it twice, it only occurred in a particular scenario and it was getting frustrating.
- Open the DevTools console by pressing
Ctrl+Shift+JWindows / Linux
- Typing the following property in the console will return the current active DOM element.
By using this simple property I could track down the offending component and fix the issue.