Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome: Inspect elements that appear only when dragging

I often want to view the styles of an element that appears only when dragging or when the mouse is clicked (mousedown event). How can I view the element's style using Google Chrome's developer tools?

like image 914
Leo Jiang Avatar asked Mar 23 '14 22:03

Leo Jiang


People also ask

How can I inspect an element which disappears when my mouse moves away?

Just go to Sources-> Event Listener Breakpoints-> Mouse-> mousedown in Chrome.

How do I inspect autocomplete dropdown?

With the suggestions dropdown visible and DevTools opened, press F8 and switch to the DevTools. You will immediately break at the JS blur handler for the field, so the dropdown will not be removed, thus you'll be able to inspect its DOM.

How do you inspect hidden elements?

VIEW HIDDEN ELEMENTS: The extension makes visible those elements hidden by the "display:none", "type=hidden", and "visibility=hidden" attributes / styles. To do this hit LazySec's "Show Hidden Elements" button.


1 Answers

Open the developer tools.

Go to "Sources":

Sources tab

Expand "Event Listener Breakpoints" on the right:

Event Listener Breakpoints

Add a listener for keydown events on the keyboard section:

enter image description here

Now start dragging the thing you want, and when it's time press any key on your keyboard and you'll be able to inspect the dragable element.

like image 102
David Antunes Avatar answered Oct 02 '22 10:10

David Antunes