I am making a script to throw errors with javascript and in this function it throws the focus on the field that is with errors. In some cases, when the field is not visible, for example, an error appears in the console, nothing so serious that interrupts my application, the error says that the field is not focusable. As these errors make me uneasy I want to avoid them and so I want to do a conditional to check if a field can be focused with .focus
or not.