events: sync event now bubbles to the body from detached tabs

This commit is contained in:
jean-emmanuel 2017-01-03 16:29:54 +01:00
parent 399c66fe1a
commit 543e78c29c

View file

@ -42,6 +42,8 @@ module.exports.tabs = function(data,parent,main,parentLabel){
iterators.widget = {}
widgetManager.reset()
var $body = $('body')
}
var main = main?'main ':'',
@ -74,6 +76,10 @@ module.exports.tabs = function(data,parent,main,parentLabel){
module.exports.widgets(tabData.widgets,tabContent)
}
tabContent.on('sync.detached', (e)=>{
if (!document.contains(tabContent[0])) $body.trigger(e)
})
// content.append(tabContent)
TABS['#'+id]= {
parent:content,