Fix right mouse click on <a href> in firefox (#1010)
* Check if the left mouse is pressed * using button instead of which
This commit is contained in:
parent
14013f5098
commit
61d6d71e8c
|
|
@ -22,7 +22,7 @@ registerFunction(`${registeredFunctionPrefix}.enableNavigationInterception`, ()
|
|||
// We must explicitly check if it has an 'href' attribute, because if it doesn't, the result might be null or an empty string depending on the browser
|
||||
const anchorTarget = findClosestAncestor(event.target as Element | null, 'A') as HTMLAnchorElement;
|
||||
const hrefAttributeName = 'href';
|
||||
if (anchorTarget && anchorTarget.hasAttribute(hrefAttributeName)) {
|
||||
if (anchorTarget && anchorTarget.hasAttribute(hrefAttributeName) && event.button === 0) {
|
||||
const href = anchorTarget.getAttribute(hrefAttributeName)!;
|
||||
const absoluteHref = toAbsoluteUri(href);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue