Skip to content

Commit

Permalink
fix(button): Don't ovrwrite user supplied tabindex if not disabled (#…
Browse files Browse the repository at this point in the history
…1120)

* fix(button): Don't ovrwrite user supplied tabindex if not disabled

A user supplied `tabindex` to b-button was being overwritten as `null`

This fix preserves the users original tabindex when not disabled

Addresses issue #1119

* ESLint

* Update button.js
  • Loading branch information
tmorehouse committed Sep 27, 2017
1 parent fc46ef9 commit 18f5129
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/button.js
Expand Up @@ -99,7 +99,7 @@ export default {
// Tab index is used when the component becomes a link.
// Links are tabable, but don't allow disabled,
// so we mimic that functionality by disabling tabbing.
tabindex: props.disabled && isLink ? "-1" : null
tabindex: props.disabled && isLink ? "-1" : (data.attrs ? data.attrs['tabindex'] : null)
},
on
};
Expand Down

0 comments on commit 18f5129

Please sign in to comment.