-
Notifications
You must be signed in to change notification settings - Fork 85
IE11 bug when absolute URL is used #163
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
Comments
zipper
added a commit
to zipper/nette.ajax.js
that referenced
this issue
May 27, 2019
- do not use new URL constructor, use custom function instead - changed condition whether to use ajax when absolute URL is used
zipper
added a commit
to zipper/nette.ajax.js
that referenced
this issue
May 30, 2019
- do not use new URL constructor, use custom function instead - changed condition whether to use ajax when absolute URL is used
zipper
added a commit
to zipper/nette.ajax.js
that referenced
this issue
May 30, 2019
- do not use new URL constructor, use custom function instead - changed condition whether to use ajax when absolute URL is used
I believe I've solved this by PR #164. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When absolute URL is used on AJAX link, there is
new URL()
used, which is not supported in IE11.More over, when the URL is parsed, the regular expression below doesn't make any sense (or does it?):
pathname
property used in string, which never should contain port number, so checking the port number is unnecessary. Port number would be inhost
(or even better inport
)./
inpathname
, even though thepathname
might be missing in link. So even URL eg. "http://www.example.com#foo" will returnpathname
equal to/
. Therefore,parsedUrl['pathname'] + parsedUrl['search'] + parsedUrl['hash']
may never begin with#
, but always with/
.So in my opinion, the correct condition should be if
pathname
from currentlocation
is the same as inparsedUrl
,search
is the same and hash is specified inparsedUrl
. If so, return false, otherwise return true. Is that correct or am I missing something?The text was updated successfully, but these errors were encountered: