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

inline SVG element focusing issue #568

Open
tadam313 opened this issue Sep 5, 2017 · 0 comments
Open

inline SVG element focusing issue #568

tadam313 opened this issue Sep 5, 2017 · 0 comments

Comments

@tadam313
Copy link

tadam313 commented Sep 5, 2017

What version of ng-dialog are you using?
0.6.6

What version of AngularJS are you using?
1.5.9

What browsers are affected?
every browser

Please provide either a JSFiddle, Plunkr example that replicates the issue
sorry don't have one, but the description should be clear

Please describe the issue
When using "trapfocus" property and the dialog manages the focus by itself, an inline SVG element would break the focus order.

What did you expect to happen?
inline SVG element is "integrated" in the focus order and we can jump to the next focusable element by pressing 'TAB'.

What actually happened?
When the SVG element is focused and the user hits TAB the focus jumps back to the very first focusable element in the dialog, instead of the next one.

The reason is when the dialog tries to get the focusable elements it ignores every invisible element by checking offsetHeight and offsetWidth. However those properties have been deprecated for SVGElement which means it always considers an inline SVG element invisible even if that's actually visible (see here). As a result it gets confused, thinks nothing is actually focused and jumps back to the first focusable element inside the dialog.

@tadam313 tadam313 changed the title inline SVG elements focus issue inline SVG element focusing issue Sep 5, 2017
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

1 participant