Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force elements to remain visible on focus change, even when they would disappear on blur

In Material UI, there's an autocomplete. When I focus the input and press up/down, the options are displayed.

I'd like to inspect those options using right click -> Inspect (in Chrome). But as soon as the focus leaves the input, the options disappear (and I can't find them in the DOM), probably because of an onBlur or similar JavaScript event.

https://material-ui.com/components/autocomplete/

Is there a way to keep the options visible, even when the focus leaves the input, so I can inspect their DOM?

like image 941
Joshua Muheim Avatar asked Nov 16 '25 07:11

Joshua Muheim


1 Answers

I you need it just for inspection you can add open attribute to Autocomplete element.

<Autocomplete
   ...
   open
/>
like image 168
RauboLuk Avatar answered Nov 17 '25 21:11

RauboLuk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!