Comments Widget, Window and Webix Jet

Hello,

I think there is something wrong with probably the destructor of the comments widget.
It is unfortunately really complicated to set up a sample, but perhaps by describing the problem there is a solution or a comfirmation of a bug.

Having a bigger webix jet app with several pages (routie), I have a window
like
class WikiSidemenuCommentsWindow extends JetView {
config() {
return {
view:“popup”,
id:“wiki_sidemenu_comments”,
height: 200,
width: 300,
body: {
view:“comments”,
currentUser:2,
data:[
{
id:1, user_id:1, date:“2018-06-10 18:45”,
text:“Let’s deal with half of the points in the plan without further delays.”
},
{ id:2, user_id:2, date:“2018-06-10 19:40”, text:“Yes, let’s do it.” }
],
users:[
{ id:1, value:“Corvo Attano”, image:"./common/imgs/corvo.jpg" },
{ id:2, value:“Daisy Fitzroy”, image:"./common/imgs/daisy.jpg" }
]
});
};
}
show(target) {
this.getRoot().show(target);
}
}

This window is show on a button click. I have windows like this in several other pages with no problem (but like written below with other widgets).

When I now change the page to another one (and in that moment the page is destructed automatically by webix jet) I have the following error in the console:
(index):17 Uncaught TypeError: Cannot read property ‘parentNode’ of null
at u.adjust (baseview.js:306)
at u.resize (window.js:394)
at u.resizeChildren (window.js:391)
at u.resizeChildren (baselayout.js:198)
at u.resizeChildren (layout.js:136)
at u.resizeChildren (baselayout.js:198)
at u.resizeChildren (layout.js:136)
at u.resize (baseview.js:337)
at u.resize (button.js:256)
at u.P$ (selection.js:527)

This problem occur really only when using the comments widget. If I change the body to another widget like datatable or anything else, there is no error.
That’s why I think the bug is connected to the new comments widget.
I am using the latest Webix UI v.6.1.2 Pro and Webix Jet 1.6.3-m.

Thanks,
Martin

Hello,

I have a sample.

Please change here to “data” and change back to start and check the console…
https://snippet.webix.com/8wrq9k2i

Thanks,
Martin

Hi,

Thanks for the snippet. There is really an issue with “comments” destruction, the fixed build will be available in the next few days.