[FIX] Prevent dropdown closing when a contenteditable children is focused

bzr revid: fme@openerp.com-20131106115754-lyt6hd8pnrfv7vfi
This commit is contained in:
Fabien Meghazi 2013-11-06 12:57:54 +01:00
parent 937fa8ab99
commit 2d81712e2c
1 changed files with 9 additions and 0 deletions

View File

@ -11,6 +11,15 @@
if (!is_smartphone) {
website.ready().then(website.init_editor);
}
$(document).on('hide.bs.dropdown', '.dropdown', function (ev) {
// Prevent dropdown closing when a contenteditable children is focused
if (ev.originalEvent
&& $(ev.target).has(ev.originalEvent.target).length
&& $(ev.originalEvent.target).is('[contenteditable]')) {
ev.preventDefault();
}
});
});
function link_dialog(editor) {