Skip to content

Commit

Permalink
fix onClickTooltip expecting for anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbarbara committed Jan 28, 2017
1 parent 0613ed3 commit 851b69b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/Joyride.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ class Joyride extends React.Component {
onClickTooltip(e) {
const { index, shouldRun } = this.state;
const { steps, type } = this.props;
const el = e.currentTarget.className.indexOf('joyride-') === 0 && e.currentTarget.tagName === 'A' ? e.currentTarget : e.target;
const el = e.currentTarget.className.includes('joyride-') && ['A', 'BUTTON'].includes(e.currentTarget.tagName) ? e.currentTarget : e.target;
const dataType = el.dataset.type;

/* istanbul ignore else */
Expand Down

0 comments on commit 851b69b

Please sign in to comment.