Tuesday, 15 July 2014

javascript - Problems with CKEditor dialog on top of Bootstrap modal window -



javascript - Problems with CKEditor dialog on top of Bootstrap modal window -

i have included plugin here, include code snippets on site using ckeditor. this, found people have problems ckeditor dialog boxes , bootstrap's modal window. dialog box opened isn't focused on, , text can't entered.

a solution found here. fixes issues other dialog boxes, not 1 opens pre tag plugin. have advice code snippets work in ckeditor , bootstrap?

$.fn.modal.constructor.prototype.enforcefocus = function() { modal_this = $(document).on('focusin.modal', function (e) { if (modal_this.$element[0] !== e.target && !modal_this.$element.has(e.target).length && !$(e.target.parentnode).hasclass('cke_dialog_ui_input_select') && !$(e.target.parentnode).hasclass('cke_dialog_ui_input_text')) { modal_this.$element.focus() } }) };

the solution adding condition

&& !$(e.target.parentnode).hasclass('cke_dialog_ui_input_textarea')

now works! helps same issue.

javascript jquery twitter-bootstrap ckeditor code-snippets

No comments:

Post a Comment