D
D
Dubrovin2018-02-28 10:11:50
JavaScript
Dubrovin, 2018-02-28 10:11:50

How to make it so that when clicking on an element with tabindex there is no autofocus?

How to make it so that when clicking on an element with tabindex there is no autofocus?
For example, a button with tabindex should not remain in focus after clicking on it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kalibrov, 2018-02-28
@Dubrovin

Call the blur method on an element. If you just visually need the element not to change with focus, then you can simply style the element for the :focus pseudo-class through css

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question