[FIX] web_editor: remove editor bar flickering when edit a qweb field

Issue: When the user click on a field (like monetary, text...) the editor bar appear and disappear. The undo buton is hidden for this fields.
This commit is contained in:
Christophe Matthieu
2015-11-04 16:10:44 +01:00
parent 7228b29cb2
commit c7ff7cb491
2 changed files with 3 additions and 7 deletions
@@ -258,13 +258,6 @@ eventHandler.modules.popover.update = function ($popover, oStyle, isAirMode) {
fn_popover_update.call(this, $popover, oStyle, isAirMode);
if (!isAirMode || (oStyle.range && $(oStyle.range.sc).closest('[data-oe-model]:not([data-oe-model="ir.ui.view"]):not([data-oe-type="html"])').length)) {
$imagePopover.hide();
$linkPopover.hide();
$airPopover.hide();
return;
}
if (oStyle.image) {
if (oStyle.image.parentNode.className.match(/(^|\s)media_iframe_video(\s|$)/i)) {
oStyle.image = oStyle.image.parentNode;
@@ -603,6 +603,9 @@ rte.Class.include({
$editable.attr('contenteditable', false);
$editable.find('.oe_currency_value').attr('contenteditable', true);
}
if ($editable.is('[data-oe-model]') && !$editable.is('[data-oe-model="ir.ui.view"]') && !$editable.is('[data-oe-type="html"]')) {
$editable.data('layoutInfo').popover().find('.btn-group:not(.note-history)').remove();
}
},
});