From 851b69b0f8f25f5b1ac5f2a089659f5095dc4952 Mon Sep 17 00:00:00 2001 From: Gil Barbara Date: Sat, 28 Jan 2017 04:25:58 -0200 Subject: [PATCH] fix onClickTooltip expecting for anchors --- src/scripts/Joyride.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/Joyride.jsx b/src/scripts/Joyride.jsx index 65775cad5..92332dfd7 100644 --- a/src/scripts/Joyride.jsx +++ b/src/scripts/Joyride.jsx @@ -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 */