events: fix tab-created (trigger parent directly)

This commit is contained in:
jean-emmanuel 2018-01-12 14:54:41 +01:00
parent 8c194be517
commit 3c83a35c37
2 changed files with 1 additions and 2 deletions

View file

@ -36,7 +36,7 @@ var updateDom = function(widget, options = {}) {
widget.container.replaceWith(newWidget.container)
if (data.type == 'tab') newWidget.trigger('tab-created', [{widget: widget}])
if (data.type == 'tab') newWidget.parent.trigger('tab-created', [{widget: widget}])
$('.editor-root').attr('data-widget', $('.root-container').attr('data-widget'))

View file

@ -80,7 +80,6 @@ module.exports = class Panel extends _widgets_base {
})
this.on('tab-created', (e)=>{
if (e.widget == this) return
this.createNavigation()
e.stopPropagation = true
})