Callback of tab item activate when close parent window.
Rincelent opened this issue · 0 comments
Rincelent commented
Code sample to reproduce issue (just click on close button)
var pos = photonui.Helpers.getAbsolutePosition("demo");
var tabs = new photonui.TabLayout({
tabsPosition: "top", // "top", "bottom", "left" or "right"
children: [
new photonui.TabItem({
title: "Tab 1",
child: new photonui.Label("Widget inside the first tab"),
callbacks: {
show: function(tab) {
console.log(tab.visible)
}
},
}),
new photonui.TabItem({
title: "Tab 2",
child: new photonui.Button(),
callbacks: {
show: function(tab) {
console.log(tab.visible)
}
},
}),
new photonui.TabItem({
title: "Tab 3",
callbacks: {
show: function(tab) {
console.log(tab.visible)
}
},
})
]
});
new photonui.Window({
title: "My Window",
visible: true,
child: tabs,
x: pos.x, y: pos.y,
width: 300, height: 100,
callbacks: {
"close-button-clicked": function(widget) {
widget.destroy();
},
"position-changed": function(widget, x, y) {
widget.title = "My Window (x: " + x + ", y: " + y + ")";
}
}
});