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

paper-input breaks tabindex contract #667

Open
6 tasks
rslawik opened this issue Jul 29, 2018 · 0 comments
Open
6 tasks

paper-input breaks tabindex contract #667

rslawik opened this issue Jul 29, 2018 · 0 comments

Comments

@rslawik
Copy link

rslawik commented Jul 29, 2018

Description

<paper-input> does not respect tabindex contract.

https://codepen.io/rileybauer/pen/vaeMaQ (by @rileyjbauer) shows that tabIndex property and tabindex attribute can go out of sync.
It looks like the tabIndex property is generated by Polymer: https://imgur.com/sSSBMFx.

Expected outcome

The property and the attribute are in sync.

For example:

$0.tabIndex = -1;
$0.getAttribute('tabindex'); // returns -1

and

$0.setAttribute('tabindex', 0);
$0.tabIndex; // returns 0

Actual outcome

Initial value of $0.tabIndex is undefined.

Changing the property does not affect the attribute.
For example:

$0.getAttribute('tabindex'); // returns 0
$0.tabIndex = -1;
$0.getAttribute('tabindex'); // returns 0

Live Demo

https://codepen.io/rileybauer/pen/vaeMaQ (by @rileyjbauer)

Steps to reproduce

Steps are explained in the live demo.

Additionally try interacting with <paper-input> directly from the console:

$0.tabIndex; // returns undefined
$0.getAttribute('tabindex'); // returns 0
$0.tabIndex = -1;
$0.getAttribute('tabindex'); // returns 0

Browsers Affected

  • [ x ] Chrome
  • [ x ] Firefox
  • [ x ] Safari 11
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
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