[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.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user