When i call $('#someelement').focus()
it doesn't give any error message but practically not working. When i try to get document.activeElement
it still returning body
element.
Below is my console result:
You are calling .focus
for #IncomeExpense_wrapper
and that is <div>
and div
does not have focus
event, only input elements does.
Can't help further, because you provide no info on what focusing on div must do.