-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: href.js doesn't trigger callback in IE #82
Comments
Uh oh, that's no good. Any suggestions on how to fix this?
…On Sat, Feb 25, 2017, 23:01 Owen Derby ***@***.***> wrote:
Clicking on an anchor element in IE doesn't trigger the callback passed to
href to be called. I believe this is because the logic for finding the
anchor node containing the href doesn't work properly in IE, specifically line
24 <https://github.com/yoshuawuyts/sheet-router/blob/master/href.js#L24>,
which checks if the found anchor points to the same host as the current
window, because the host property of anchor elements is not available on
IE
<https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/host>
(nor Safari, for that matter).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#82>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ACWlenT__bIzT39FLOqFiQipD-WPtBpXks5rgKS2gaJpZM4MMJ0s>
.
|
I'd be surprised if someone hasn't already written the logic to simulate/polyfill the host property - afterall, it should be deterministic given the href, right? I'm sure there are some corner cases, but you should be able to just pull in the bits you need, if you don't want the bloat of adding a whole library to do it. |
jhnns
added a commit
to jhnns/sheet-router
that referenced
this issue
Jun 26, 2017
jhnns
added a commit
to jhnns/sheet-router
that referenced
this issue
Jun 26, 2017
jhnns
added a commit
to jhnns/sheet-router
that referenced
this issue
Jun 26, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clicking on an anchor element in IE doesn't trigger the callback passed to href to be called. I believe this is because the logic for finding the anchor node containing the href doesn't work properly in IE, specifically line 24, which checks if the found anchor points to the same host as the current window, because the
host
property of anchor elements is not available on IE (nor Safari, for that matter).The text was updated successfully, but these errors were encountered: