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

fix(modal): focus defaults to the modal itself, not the first element #6295

Closed
wants to merge 1 commit into from

Conversation

ajpz
Copy link
Contributor

@ajpz ajpz commented Oct 20, 2016

I recently bumped version from 2.1.4 to 2.2.0.

In the updated version, modals set default focus to the firstFocusableElement. This seems like unwanted default behavior (for example, input elements may have additional focus behavior that I'd like not to trigger by default).

Also, modals already had a viable and acceptable default state -- focus would be applied to the modal itself when autofocus wasn't explicitly set on any element.

This change is a quick example of the minimal changes required to revert to simpler, less opinionated, default behavior.

@Jaco-Pretorius
Copy link

👍

@wesleycho
Copy link
Contributor

Looking at the original commit that changed this, this looks like feature creep that should have been in a separate changeset.

This LGTM

@flehannier
Copy link

flehannier commented Dec 22, 2016

I guy,

in the application i have a modal box with a directive uib-typeahead on an input. the focus triggers a list.
So your change can have an impact on the uib-typeahead because the focus does not work anymore ?

thx for your answer

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

Successfully merging this pull request may close these issues.

None yet

4 participants