Today I need to fix a small CSS issue of a time picker component. In order to debug the code, Chrome debugger will be used and I found it is not so straightforward…
Basically the UI will be triggering on click, and if there is any click event outside of the component itself, it will be vanished. Or in the other word, be completely removed from the DOM. The same problem happens if you want to see the style of bootstrap popover, or any component where some UI will be displayed on hover/click, and hidden on hover/click outside.
After crossing this question, I tested these two solutions that looks promising. Sounds easy but why I didn’t think of these in the first place ?!
setTimeout(function(){ debugger }, 5000)
in the console. This will break into the debugger in 5 seconds.Sources
tab in Chrome debugger
.F8
. This step is very important. If you have clicked anywhere on the actual page F8 will do nothing. Your last click needs to be somewhere in the inspector, like the sources tabNoted: If the DOM element uses the focusout event to hide you have no chance to hit F8