I found a process in which the close button on the modal details window from the calendar will no longer work.
Steps to repeat:
- click on a calendar item to open a modal window showing the basics of that calendar item
- click on the details button within the modal window
- click the browsers’ back button
- Now the close button will not work but the details button still does.
It turns out this is a problem that happens using Bootstrap and there are a couple ways of tackling it. Here is a solution I got to work. The focus of this solution is to close the modal first, and then go to the details page so that when the back button is pressed you’re back on the calendar.
$(function () {
$("a.eventUrl").click(function (e) {
e.preventDefault();
theURL = e.currentTarget.href;
// hide the modal
$("#modal-view-event").hide();
$(".modal-backdrop").hide();
// go to the details URL
window.location.href = theURL;
});
});
Screenshot: