Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModalManager custom input focus #13488

Closed
totpero opened this issue Aug 1, 2022 · 2 comments
Closed

ModalManager custom input focus #13488

totpero opened this issue Aug 1, 2022 · 2 comments
Assignees
Milestone

Comments

@totpero
Copy link
Contributor

totpero commented Aug 1, 2022

Hi,

I want to add focus to custom modal input not to first modal element.

I suggest to add skip custom class name here like this:
var $firstVisibleInput = _$modal.find('input:not([type=hidden]):not(.skipfocus):first')

I also have my custom class for datepicker control, I can't use datepicker class to skip focus because it will initialize also the standard datepicker.

Other issue is select2 control focus.

Thanks

@maliming
Copy link
Member

maliming commented Aug 1, 2022

I think we can add an option options.focusElement.

@maliming maliming self-assigned this Aug 1, 2022
@maliming maliming added this to the 7.0-preview milestone Aug 1, 2022
@totpero
Copy link
Contributor Author

totpero commented Aug 1, 2022

@maliming this will be much better. options.focusElement can be element or function that return element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants