This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/web/modules/contrib/webform/js/webform.dialog.js
2017-03-16 15:29:07 +00:00

20 lines
525 B
JavaScript

/**
* @file
* Javascript behaviors to fix dialogs.
*/
(function ($, Drupal) {
'use strict';
// @see http://stackoverflow.com/questions/20533487/how-to-ensure-that-ckeditor-has-focus-when-displayed-inside-of-jquery-ui-dialog
var _allowInteraction = $.ui.dialog.prototype._allowInteraction;
$.ui.dialog.prototype._allowInteraction = function (event) {
if ($(event.target).closest('.cke_dialog').length) {
return true;
}
return _allowInteraction.apply(this, arguments);
};
})(jQuery, Drupal);