Skip to content
Snippets Groups Projects
Commit 0c2767c8 authored by Christophe Matthieu's avatar Christophe Matthieu Committed by qsm-odoo
Browse files

[FIX] web_tour: prevent redirection if a link is a javascript protocol

The default action for a tour step whose trigger is a <a/> tag is:
* Redirection to the a href if it is a valid link
* Clicking on it if the <a/> is used as a handler-binded button

The previous condition forgot to consider href="javascript:void(0)" as
a non-valid redirection link.
parent 57041f7e
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ var RunningTourActionHelper = core.Class.extend({
},
_click: function (values) {
var href = values.$element.attr("href");
if (href && href.length && href[0] !== "#" && values.$element.is("a")) {
if (href && href.length && href[0] !== "#" && values.$element.is("a") && href !== "javascript:void(0)") {
window.location.href = href;
} else {
values.$element.mousedown().mouseup().click();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment