Closed wcaleb closed 6 years ago
form
in this case is a jQuery object, so it's jQuery's append
that's being called, not the DOM function you linked to.
Do you get an error implicating that line in the IE console? What version of IE is this (I'm assuming 11)?
I tried this out, just very quickly, and had no problem on IE 11.
I do get an error implicating that line and it just says it’s a syntax error.
, 2018, at 5:35 PM, John Flatness notifications@github.com wrote:
I tried this out, just very quickly, and had no problem on IE 11.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Is the site showing the problem available at some URL?
Yeah, I can confirm the issue on your site. This "syntax error" or other unspecified error nonsense is one of the worst parts of trying to deal with IE.
I think what's happening is that it's actually complaining about what jQuery's doing when the append is called. The relevant bit of what it will do is execute any script blocks that came back from the AJAX request for the type form. You've got some custom stuff going on in there, namely scripts for running a datepicker widget and for adding some explanatory text to the map, it looks like.
If you look at the Network tab, you'll see IE downloads the datepicker JS file, but not the map explanation one, which comes later. This leads me to think that it's the datepicker JS that's actually the culprit.
Looking at that datepicker script , my attention is drawn to the comments at the bottom: those are HTML comments. This is a common enough mistake that the other browsers apparently support them and don't even complain about them, but my guess would be that IE doesn't. I think removing those comments will likely fix the issue.
I'm actually a little surprised that the other browsers don't complain about this at all, but they don't (you can try putting an HTML comment in the Chrome console, it just happily returns undefined
and raises no error).
Actually now that I look at it, supporting HTML comments is actually required by the standard. That's kind of sad.
Of course, IE doesn't actually support that version of the standard, so. Learn something every day.
whoops, that previous comment was supposed to actually link the script in question, it's this:
https://harveymemories.org/plugins/Contribution/views/public/javascripts/datepicker.js
I removed the comments from datepicker, and it now works! Can't believe that did it, but it did. Thank you very much for your help!
The Contribution form never appears in Internet Explorer, even after an Item Type is selected from the drop-down select menu.
My research suggests the problem is with this line in
contribution-public-form.js
.Namely,
append()
is not supported in Internet Explorer. This probably needs a polyfill or a refactoring but I'm not sure the best way to go about it.