summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-01-05 15:45:57 +0100
committerAaron Bohy <aab@odoo.com>2018-01-08 08:23:02 +0100
commitbd2e783d30ece1f2b56d492ed1dc704d96d548a0 (patch)
tree55289af8f168b7a2e8dda1fdd55840f441525354 /addons
parent25943696ea00b140ea19de1c6ee6a42d97d8e2f7 (diff)
[FIX] web: DebugManager in dialogs
For actions executed in dialogs (target='new'), a DebugManager is instantiated and appended to the dialog's header (div with classname 'modal-header'). However, in the full composer dialog (in a chatter, click on 'Send message', and then click on the expand icon), there are more than one element matching the selector '.modal-header', because it also occurs in the html generated by summernote. In this case, the widget's $el is cloned and appended to each element of the JQuery nodeset matching the given selector, but widget.$el only refers to one of those. So when it isn't the one appended in the real dialog's header, the debug manager remains empty as the widget isn't able to populate it correctly. This bug appeared with rev. 5f1ef09, as before it, the debug manager was appended to the dialog before its content.
Diffstat (limited to 'addons')
-rw-r--r--addons/web/static/src/js/widgets/debug_manager.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/widgets/debug_manager.js b/addons/web/static/src/js/widgets/debug_manager.js
index 8007dc2ab7e..d6069f7d4ec 100644
--- a/addons/web/static/src/js/widgets/debug_manager.js
+++ b/addons/web/static/src/js/widgets/debug_manager.js
@@ -782,7 +782,7 @@ if (core.debug) {
// Instantiate the DebugManager and insert it into the DOM once dialog is opened
this.opened(function() {
self.debug_manager = new DebugManager(self);
- var $header = self.$modal.find('.modal-header');
+ var $header = self.$modal.find('.modal-header:first');
return self.debug_manager.prependTo($header).then(function() {
self.debug_manager.update('action', parent.dialog_widget.action, parent.dialog_widget);
});