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:
@@ -66,7 +66,7 @@ const template = {
|
||||
{
|
||||
let extra = this.getKey(item, "extra");
|
||||
return <>
|
||||
<a href="#" highlight="URL">{text}</a> 
|
||||
<a href={item.item.url} highlight="URL">{text}</a> 
|
||||
{
|
||||
!(extra && extra.length) ? "" :
|
||||
<span class="extra-info">
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user