summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2013-11-06 12:57:54 +0100
committerFabien Meghazi <fme@openerp.com>2013-11-06 12:57:54 +0100
commit2d81712e2cfa0f87ce112a6cf540ed39680b60f3 (patch)
treec3bb22516c5ea96b4133f262fee49e04d964d64f
parent937fa8ab995ce0d94036cef12a10860b1c696e66 (diff)
[FIX] Prevent dropdown closing when a contenteditable children is focused
bzr revid: fme@openerp.com-20131106115754-lyt6hd8pnrfv7vfi
-rw-r--r--addons/website/static/src/js/website.editor.js9
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) {