Why cant stay focus state on before element

https://jsfiddle.net/52vbrhgf/

Just work only hover? What the reason when click on div with mouse then not stay that blue label untill click on white space?

Thank you.

You can add the tabindex attribute to the div.
https://jsfiddle.net/h7cbseav/

1 Like

You are a life saver :smiley: Thank you. Btw you know the logic behind it? I mean if tabindex 0 is do noting with tab not? or just happen work with this :D?

It will let you tab to the div as well.

It just makes it so the div can actually have focus. The :focus pseudo-class is normally for an element that can be clicked into like an input element.

1 Like

Please can you take a look at https://jsfiddle.net/s9v3kfgw/4/

My problem with it is only stay on focus when click inside content (red background) not on brand word works clicked focus? How can make that when click on brand word from that also stay focus i mean not to click red background? In this context? You have any idea?

Thanks!

You’ve given the em element its own tab index, so it takes focus away from the span. Remove that and it works.

1 Like

Yes I think about it and really! Thank you.