From 304bfab29e33c29dbe737a53e0ddda1af353f1ab Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 17 Dec 2008 18:35:02 -0500 Subject: [PATCH] Fix clicking links in the MOW --- common/content/template.js | 2 +- common/content/ui.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/common/content/template.js b/common/content/template.js index 5f71dce2..7b937537 100644 --- a/common/content/template.js +++ b/common/content/template.js @@ -66,7 +66,7 @@ const template = { { let extra = this.getKey(item, "extra"); return <> - {text}  + {text}  { !(extra && extra.length) ? "" : diff --git a/common/content/ui.js b/common/content/ui.js index 328ce866..a1b93ab1 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1176,6 +1176,20 @@ function CommandLine() //{{{ function isScrollable() !win.scrollMaxY == 0; function atEnd() win.scrollY / win.scrollMaxY >= 1; + if (event.type == "click") + { + if (event.target instanceof HTMLAnchorElement && event.button < 2) + { + event.preventDefault(); + let target = event.button == 0 ? liberator.CURRENT_TAB : liberator.NEW_TAB; + if (event.target.href == "#") + liberator.open(String(event.target), target); + else + liberator.open(event.target.href, target); + } + return; + } + let key = events.toString(event); if (startHints)