instantpage / instant.page

Make your site’s pages instant in 1 minute and improve your conversion rate by 1%
https://instant.page
MIT License
6.04k stars 205 forks source link

t.target.closest is not a function #23

Closed PikachuEXE closed 5 years ago

PikachuEXE commented 5 years ago

https://github.com/instantpage/instant.page/blob/v1.2.1/instantpage.js#L52

Most of them are from Chrome 59+ / Edge 17.17134 Which should support Element.closest

I do plan to add polyfill for Element.closest but I don't think it's related to most browsers that raises this error for us

dieulot commented 5 years ago

Could you link to a page where this happens? Do you know on which links this happens?

PikachuEXE commented 5 years ago

I can't reproduce it locally And I cannot enable it on production until there is [whitelist mode](https://github.com/instantpage/instant.page/issues/18 is added)

Maybe whitelisting only certain links (common navbar/footer, frequently used link buttons...) would solve this issue for us as well

No way to tell what's causing it for now Let me reopen this issue once I got similar error reports again

dieulot commented 2 years ago

This is fixed (with a check on event.target.closest) in v5.1.1. https://github.com/instantpage/instant.page/commit/00249af912beabe77ecd902ebcef190d698adc81