This error had been driving me crazy for a few weeks – iPhone users were unable to submit new definitions on Hackterms. The culprit was hard to track down, because (1) I don’t own an iPhone and (2) there’s no way to console log. However, I finally sat down and figure it out.
To display error messages, I added a little flashing error message box right in the New Definition modal.
The culprit was some rogue jQuery (is there any other kind?) I was doing some routine validation to check if a user selected a category from a dropdown, and this line would not run on iPhones:
This ran just fine on Android and desktops, but not on iPhones. The solution was simple, once I zeroed in on it (read – found the right StackOverflow thread): a vanilla JS replacement worked just fine:
var e = document.getElementById("ddlViewBy"); var strUser = e.options[e.selectedIndex].value;
Now iPhone users can use my site 🙂