elFinder cannot get focus when invoked from a popup (single mail, event reminder)
When invoked from a popup, e.g. from a single email or an event reminder, elFinder cannot get the focus, even if the window is clicked.
As a result:
- Search only works in the first-key mode -- it is not possible to enter more than one character in the search bar. Not sure why even the first key works, but perhaps there lies a clue to the cause.
- Files/folders cannot be renamed.
While I don't understand the cause of the problem, I did find that normal operation of elFinder is restored while the CKeditor div (or one of its parents) is hidden. While possibly not the best solution, the following modification to the "if (ckf)" block of ckeditor5/js/wysiwyg/crm.ckeditor5.js resolves the problem:
if (ckf) {
// Take over ckfinder execute()
ckf.execute = () => {
$('.crm-html_email-accordion').hide(); //BobS: Upon opening elFinder, hide the parent div of ckeditor as a workaround for elFinder unable to receive keyboard input
getfm().then(fm => {
fm.getUI().dialogelfinder('open');
fm.bind('hide', function(event) { //BobS: when elFinder closes, restore the parent div.
$('.crm-html_email-accordion').show();
});
});
};
}