Closed eerohele closed 6 years ago
Ugh, browsers, amirite?
I'd be open to accepting a PR with the approach you've outlined above.
Cool — I'll run some more tests to try and make sure the change doesn't break anything and then submit a PR.
Thanks!
Given:
If you click the image on IE11 (at least, possibly other IE versions, too), Accountant doesn't block the page reload.
This is because
find-href-node
uses thehref
DOM property, and on IE11, for some reason,document.querySelector("img").href
returns the value of thesrc
attribute of theimg
element.logo.png
isn't a known route, which leads to the browser attempting to reload the page.One possible fix would be to use
.getAttribute
instead. Something like this, for example: