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

trapFocus causes issues #300

Closed
ghost opened this issue Aug 18, 2015 · 3 comments
Closed

trapFocus causes issues #300

ghost opened this issue Aug 18, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 18, 2015

I have very simple case. I have a dialog with a form. Inputs, selects, date pickers. Before everything was ok, but once i updated to 0.4 i started getting these problems.
When you open dialog, it sets automatically focus to the focusable element and it's configured by trapFocus which is 'true' by default. It's annoying, because date pickers open automatically even if it's not a first element. I would say it make sense to set trapFocus to 'false' by default to not to brake backward capability.

@egor-smirnov
Copy link
Member

@ozonni from what I see inside REAME.md file:

trapFocus {Boolean}
When true, ensures that the focused element remains within the dialog to conform to accessibility recommendations. Default value is true

I am not an expert in field of accessibility, so honestly don't know whether it's valid or not.

Maybe any other have some input on this?

@egor-smirnov
Copy link
Member

Might be related to #154 (But I didn't take a closer look).

@faceleg
Copy link
Contributor

faceleg commented Sep 23, 2015

You can set global defaults using https://github.com/likeastore/ngDialog#setdefaultsoptions

var app = angular.module('myApp', ['ngDialog']);
app.config(['ngDialogProvider', function (ngDialogProvider) {
    ngDialogProvider.setDefaults({
        trapFocus: false
    });
}]);

Also see #310.

@faceleg faceleg closed this as completed Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants