Eli Chen
Eli Chen

Reputation: 33

How to focus on main page input elment when there is a non modal dialog?

My case is under condition: The non modal dialog has input inside, and it doesn't close when clicking outside

When the non modal dialog is open, I cannot focus on input in main page. When I clicking on input in main page, the focus jumps to the first input in the dialog

I tried mainPageInput.focus() not working. Also I tried dialogInput.blur() first then mainPageInput.focus() still not working

their tabIndex are "0" as default

Upvotes: 0

Views: 336

Answers (1)

You can try to change the Tabindex to = -1, it has been work with my browser/code. Just try to adjust the tabindex below 0.

Upvotes: 0

Related Questions