Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

IronFocusablesHelper.getTabbableNodes fails if there is a SVGElement on IE11 #283

Open
2 of 8 tasks
DiegoCardoso opened this issue Jun 12, 2018 · 0 comments
Open
2 of 8 tasks

Comments

@DiegoCardoso
Copy link

Description

This issue was found while using vaadin-dialog.
The dialog component uses IronFocusablesHelper.getTabbableNodes to trap tab selection to the element inside of it when opened. We found out that in IE11, one of the examples wasn't preventing the selection to go outside of the dialog.

It turns out that the reason for that was that the dialog has one SVGElement inside of it.

On IE11, SVGElement#children returns undefined instead of an empty HTMLCollection, so on this line https://github.com/PolymerElements/iron-overlay-behavior/blob/master/iron-focusables-helper.html#L136, children.length fails with "Unable to get property 'length' of undefined or null reference".

Expected outcome

Focusable elements are returned on IE11.

Actual outcome

Error is thrown and no execution is stopped.

Example Project

iron-focusables-issue.zip

Steps to reproduce

  1. Download and run the example project
  2. Open IE11 and its devtools
  3. Click on Print focusable items button on top of the page.

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10 (maybe?)
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

1 participant