Hi, I found out this bug on safari.
This is how my page works:
In the page load I create the structure of my page, it consists of 3 rows, in the second row I define a datatable.
After I created everything I need, I call the webix.ui(...)
to load the view on the page and, at this point, the datatable doesn’t have any data yet.
After the webix.ui(...)
, I call a function that gets the data from a web service and then loads it in the datatable using a webix.DataCollection({});
The page script looks something like this:
var datasource = new webix.DataCollection({});
webix.ready(function () {
var struct = { rows: [ {...} , {"datatable"} , {...} ] }
webix.ui(struct);
$$("datatable").sync(datasource, null, true);
loadData();
}
function loadData() {
var data = //get data from web service
datasource.parse(data);
}
Everything works fine on every browser, but not on safari.
What happen on safari is that the datatable is not shown at all, when I open the page I can see the first row and the third row, but the row containing the datatable is missing.
I don’t know why but, while I were doing some experiment, I found out that, if I resize the window, the datatable row is shown.
So, as a workaround, first I tried to edit the function “loadData” like this:
function loadData() {
var data = //get data from web service
datasource.parse(data);
window.resizeBy(0, 1);
}
This would resize the window by 1 pixel after the data is loaded, and it worked.
Then I tried another solution, editing the function like this:
function loadData() {
var data = //get data from web service
datasource.parse(data);
$$("datatable").resize();
}
This worked too, and without having to resize the window.
The workaround seems to work, but is there a real solution to this problem?
Is this a known problem that will be fixed in future updates?