Is the “open” event for windows intended to act like a “beforeOpen” event? We’re trying to use a modal window as a “working…” indicator when executing code that compresses a large string that takes up to 12 seconds on some of the android devices we’re testing on. On desktop machines this code takes only a second to execute. The “open” window event triggers execution of this code. I was expecting to see the window appear before the code executes. On desktop machines, the window gets to about 75% opacity before the code finishes executing and then closes the window. On Android and iOS tablets, the window never even appears. Here’s a simplified version of our code:
$(“#myWindow”).jqxWindow({ height: 150, width: 300, theme: ‘myTheme’, isModal: true, autoOpen: false });
$(‘#myWindow’).on(‘open’, function (event) {
DoSignificantWork();
});
DoSignificantWork = function () {
‘use strict’;
try {
//Code that does significant work goes here
$(“#myWindow”).jqxWindow(‘close’);
} catch (err) {
logError(‘DoSignificantWork’, err);
}
}
Is there some way to actually get the window to appear before executing code that takes some time?