diff options
| author | Fabien Meghazi <fme@openerp.com> | 2013-11-06 12:57:54 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2013-11-06 12:57:54 +0100 |
| commit | 2d81712e2cfa0f87ce112a6cf540ed39680b60f3 (patch) | |
| tree | c3bb22516c5ea96b4133f262fee49e04d964d64f /addons/website/static/src/js/website.editor.js | |
| parent | 937fa8ab995ce0d94036cef12a10860b1c696e66 (diff) | |
[FIX] Prevent dropdown closing when a contenteditable children is focused
bzr revid: fme@openerp.com-20131106115754-lyt6hd8pnrfv7vfi
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
| -rw-r--r-- | addons/website/static/src/js/website.editor.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index a3cad21c680..734d4b0606d 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -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) { |
