Edit Event does not fire in Chrome unless DevTools is started

Asked by Frank Sandersen
7 years ago.

The click event is not fired in Chrome unless DevTools is started.
For other browser like IE and Firefox I have no problems with this.
See attached MVC code file. Basically I inserted an alert statment in the click event to verify that it has been fired. This alert box does not show up in Chrome (unless I have pressed F12 first)

I appreciate help on this. Thanks!

Answer posted by Frank Sandersen
7 years ago.

Fortunately, I found a workaround by using these JS events:

dpc.onEventMove = function (e, newStart, newEnd) {
eventChange(e, newStart, newEnd);
};

dpc.onEventResize = function (e, newStart, newEnd) {
eventChange(e, newStart, newEnd);
};

function moveEvent(id, newStart, newEnd) {
$.post("@Url.Content("~/MeetingRoomDialog/Move")" + "?Id=" + id + "&NewStart=" + newStart + "&NewEnd=" + newEnd , function (result) {
if (eval(result) != "OK") {
bootbox.alert({ title: "Error", message: eval(result) });
}
else {
dpc.commandCallBack('refresh');
}
});

};

Comment posted by Frank Sandersen
7 years ago.

Sorry, I forgot this methid in the answer above:

function eventChange(e, newStart, newEnd) {
if (!e.isEvent) {
return false;
}
else if (e.data.start.value == newStart.value && e.data.end.value == newEnd.value) {
//If no chamges in start and end - we assume edit event
editEvent(e.data.id);
}
else {
moveEvent(e.data.id, newStart.value, newEnd.value)
}
}

This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.