From 023ba51a08acba9a46e201a8f6ebd29bc1b51c53 Mon Sep 17 00:00:00 2001 From: jeffreytse Date: Sat, 3 Oct 2020 12:23:29 +0800 Subject: perfect: improve browser compatibility --- _includes/extensions/hashlocate.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '_includes/extensions/hashlocate.html') diff --git a/_includes/extensions/hashlocate.html b/_includes/extensions/hashlocate.html index 5194273..fd4a3d6 100644 --- a/_includes/extensions/hashlocate.html +++ b/_includes/extensions/hashlocate.html @@ -36,7 +36,7 @@ // The first event occurred window.addEventListener('click', function(event) { - if (event.target.matches('a')) { + if (event.target.tagName.toLowerCase() == 'a') { hashLocate(event.target.getAttribute('href')); } }); -- cgit v1.2.3