fix clicking internal link in the ckeditor toolbar, closes #3236

This commit is contained in:
zadam 2022-10-26 14:11:20 +02:00
parent f6ad1c6aa7
commit c7acfd4d4e
3 changed files with 4 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -230,18 +230,7 @@ function focusSavedElement() {
return;
}
if ($lastFocusedElement.hasClass("ck")) {
// must handle CKEditor separately because of this bug: https://github.com/ckeditor/ckeditor5/issues/607
const editor = $lastFocusedElement
.closest('.ck-editor__editable')
.prop('ckeditorInstance');
editor.editing.view.focus();
} else {
$lastFocusedElement.focus();
}
$lastFocusedElement.focus();
$lastFocusedElement = null;
}
@ -252,7 +241,7 @@ async function openDialog($dialog, closeActDialog = true) {
}
saveFocusedElement();
-
$dialog.modal();
$dialog.on('hidden.bs.modal', () => {