Skip to content

Commit

Permalink
Issue #72: Form items in jquery.ui dialogs broken (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoxela authored Jan 2, 2024
1 parent c33b4c7 commit d07a395
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/tinymce-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
$('<div id="tinymce-modal"/>').hide().appendTo('body');
}

// Prevent jquery.ui dialog focusin handling breaking tox form elements.
$(document).on('focusin', function (event) {
// It's impossible to make this more specific because of split buttons.
if (element.form && element.form.classList.contains('layout-block-configure-form')) {
event.stopImmediatePropagation();
}
});

let options = format.editorSettings.tiny_options;
options.selector = '#' + element.id;
// Prevent editor from changing urls, which mangles urls inserted via
Expand Down

0 comments on commit d07a395

Please sign in to comment.