|
onDialogClose: function (args) {
if (document.activeElement.type === "checkbox") {
// To prevent the event editor from closing
args.cancel = true;
}
} |
|
onDialogOpen: function (args) {
let kanbanObj = this.$refs.KanbanObj.ej2Instances;
if (args.requestType === "Edit") {
let dialogObj = args.element.ej2_instances[0];
dialogObj.keyDown = this.onEnterKeyPressed.bind(this);
dialogObj.dataBind();
}
},
onEnterKeyPressed: function (args) {
if (args.key === "Enter") {
// It will be triggered when press the Enter key
isEnter = true;
}
},
onDialogClose: function (args) {
let activeElement =
document.activeElement.classList.contains("e-dialog-edit") ||
document.activeElement.classList.contains("e-dialog-delete") ||
document.activeElement.classList.contains("e-dialog-cancel") ||
document.activeElement.classList.contains("e-dlg-closeicon-btn");
if (!activeElement && args.requestType === "Edit" && isEnter) {
// To prevent the event editor from closing
args.cancel = true;
isEnter = false;
}
}, |