I am running the current version, 2023.1.425.
The control is actually first created through asp.net core MVC, however I'm using the CustomCommand method as such. Please note the window is already initialized prior to this. Upon the first use of my custom "Tags" context menu, the window opens and I'm able to carry out operations as expected. After closing the window, and attempting to open it again, I get an error in the browser console.
var filemanagerNS = kendo.ui.filemanager;
filemanagerNS.commands.MyCustomCommand = filemanagerNS.FileManagerCommand.extend({
exec: function(){
var FileIDs = Array();
var i = $('#filemanager').getKendoFileManager().getSelected();
$(i).each(function(){
if (!this.isDirectory)
FileIDs.push(this.ID);
});
if (FileIDs.length > 0) {
// we'd call up our modal here populated with some kind of tag manager
$.post( "/Tags", { "FileIDs": FileIDs }, function( data ) {
$("#frmmodal").html(data).data("kendoWindow").open();
});
}
}
});
This works the first time, but attempting to open the window again results in the following error:
Uncaught TypeError: n.filemanager.commands[t] is not a constructor
at init.executeCommand (kendo.all.js:318819:21)
at init.trigger (kendo.all.js:318819:21)
at init.action (kendo.all.js:318819:21)
at init._onSelect (kendo.all.js:318819:21)
at init.trigger (kendo.all.js:318819:21)
at init._triggerEvent (kendo.all.js:318819:21)
at init._triggerSelect (kendo.all.js:318819:21)
at init._click (kendo.all.js:318819:21)
at HTMLUListElement.dispatch (jquery.min.js:3:12445)
at r.handle (jquery.min.js:3:9174)
As a result, the component stops functioning entirely, not just the context menu -> window method that seems to be causing this.