diff options
| -rw-r--r-- | vimiumFrontend.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/vimiumFrontend.js b/vimiumFrontend.js index d65a5a23..357d444e 100644 --- a/vimiumFrontend.js +++ b/vimiumFrontend.js @@ -853,10 +853,16 @@ function getLinkFromSelection() { } // used by the findAndFollow* functions. -function followLink(link) { - link.scrollIntoView(); - link.focus(); - domUtils.simulateClick(link); +function followLink(linkElement) { + if (linkElement.nodeName.toLowerCase() === 'link') + window.location.href = linkElement.href; + else { + // if we can click on it, don't simply set location.href: some pages listen for click events to fire off + // AJAX calls. + linkElement.scrollIntoView(); + linkElement.focus(); + domUtils.simulateClick(linkElement); + } } /** |
