mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 23:44:09 +01:00
No need to call toLowerCase on tagName
This commit is contained in:
@@ -429,7 +429,7 @@ const handleInnerClick = (event) => {
|
||||
for (const pathElement of event.composedPath()) {
|
||||
/** @type {any} */
|
||||
const node = pathElement;
|
||||
if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) {
|
||||
if (node.tagName === 'A' && node.href) {
|
||||
if (node.getAttribute('href') === '#') {
|
||||
event.view.scrollTo(0, 0);
|
||||
} else if (node.hash && (node.getAttribute('href') === node.hash || (baseElement && node.href === baseElement.href + node.hash))) {
|
||||
@@ -460,7 +460,7 @@ const handleAuxClick =
|
||||
for (const pathElement of event.composedPath()) {
|
||||
/** @type {any} */
|
||||
const node = pathElement;
|
||||
if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) {
|
||||
if (node.tagName === 'A' && node.href) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user