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

Popover tabindex when reference is an input #11512

Closed
aphofstede opened this issue Jun 6, 2018 · 2 comments · Fixed by #15167
Closed

Popover tabindex when reference is an input #11512

aphofstede opened this issue Jun 6, 2018 · 2 comments · Fixed by #15167

Comments

@aphofstede
Copy link

aphofstede commented Jun 6, 2018

Element UI version

2.4.0

OS/Browsers version

Chrome 66 macOS

Vue version

2.5.16

Reproduction Link

https://jsfiddle.net/mmx38qxw/2021/

Steps to reproduce

Create a Popover with an input as a "reference" element. The form field now needs two tab presses to get focus. (Caused by the tabindex being set to '0' hard-coded for the reference field)

Work-around:

    <popover ref="elPopover" ...>
    ...
    mounted() {
        this.$refs.elPopover.referenceElm.setAttribute('tabindex', -1)
    },

Related: #9038

What is Expected?

The native reference element (input, textarea, etc.) gets the tabindex

What is actually happening?

The reference element's container gets a tabindex

@ghost
Copy link

ghost commented Jun 8, 2018

Yes, it is hardcoded. This should be optional.

screen shot 2018-06-09 at 01 03 16

@ziyoung
Copy link
Contributor

ziyoung commented Jul 5, 2018

ref #11875

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

Successfully merging a pull request may close this issue.

3 participants