mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 00:37:58 +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");
|
let extra = this.getKey(item, "extra");
|
||||||
return <>
|
return <>
|
||||||
<a href="#" highlight="URL">{text}</a> 
|
<a href={item.item.url} highlight="URL">{text}</a> 
|
||||||
{
|
{
|
||||||
!(extra && extra.length) ? "" :
|
!(extra && extra.length) ? "" :
|
||||||
<span class="extra-info">
|
<span class="extra-info">
|
||||||
|
|||||||
@@ -1176,6 +1176,20 @@ function CommandLine() //{{{
|
|||||||
function isScrollable() !win.scrollMaxY == 0;
|
function isScrollable() !win.scrollMaxY == 0;
|
||||||
function atEnd() win.scrollY / win.scrollMaxY >= 1;
|
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);
|
let key = events.toString(event);
|
||||||
|
|
||||||
if (startHints)
|
if (startHints)
|
||||||
|
|||||||
Reference in New Issue
Block a user