I have a specific task to add focus on element using force state. Could you tell me please if it is possible to clear(remove) this state from the code (JS)? Thank you.
If you forced the state with the chrome dev tools, it seems like you can't remove that state with JS. You can only do it by re-clicking in the dev tools. It's probably the point of a "forced" state.
If you focused another way, you can use element.blur()
.
See HTMLElement.focus()
and HTMLElement.blur()