When the element which we are about to open has a "href" attribute, we
will execute either `window.open` or set the `window.location.href`
attribute to the target's reference. But as we forgot to call `return`
here, we will also execute the code to open elements without "href"
attribute. In the case of opening a new window, we will now first open
the new window and then also set the current window's URL to the target,
which is obviously wrong.
Fix the issue by putting the excution of `click()` inside an
else-branch.
} else {
window.location.href = e.getAttribute('href');
}
+ } else {
+ window.setTimeout(function() {e.click();}, 0);
}
- window.setTimeout(function() {e.click();}, 0);
}
/* set focus on hint with given index valid hints array */