Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Autofocus on Modal opened #1951

Closed
algorithme opened this issue Mar 18, 2014 · 1 comment
Closed

Autofocus on Modal opened #1951

algorithme opened this issue Mar 18, 2014 · 1 comment

Comments

@algorithme
Copy link

Hi,

When a modal opens, we would like to be able to set the focus to the first input. But your implementation of the directive hijack this behaviour.

ui-bootsrap-tpls-0.10.0.js line 1459
// focus a freshly-opened modal
element[0].focus();

This automatically set the focus to the opening window and the only solution we've found to set it to the first input was to delay the action using a $timeout call.

Is there any other solution? (registering a callback or listening to events?)

Would it be possible that we provide you with an improved version with a default value using the current behaviour and the availability to disable it?

@Foxandxss
Copy link
Contributor

Please refer to #1696

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

No branches or pull requests

2 participants