Permalink
Browse files

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

…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 18f512916c41965c1e388a84c541ed1362de57fb
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/components/button.js
@@ -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
};

0 comments on commit 18f5129

Please sign in to comment.