1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 22:38:00 +01:00

Fix clicking links in the MOW

This commit is contained in:
Kris Maglione
2008-12-17 18:35:02 -05:00
parent f004545036
commit 304bfab29e
2 changed files with 15 additions and 1 deletions

View File

@@ -66,7 +66,7 @@ const template = {
{
let extra = this.getKey(item, "extra");
return <>
<a href="#" highlight="URL">{text}</a>&#160;
<a href={item.item.url} highlight="URL">{text}</a>&#160;
{
!(extra && extra.length) ? "" :
<span class="extra-info">

View File

@@ -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)