|
Rank: Member Groups: Member
Joined: 11/13/2009 Posts: 22
|
Putting this on a web page in Chrome doesn't seem to work (works fine in MSIE and FF). This pops up a dialog when the page is loaded in case it isn't obvious. Has anyone seen this?
$(document).ready(function(){ eo_GetObject('dlgMyDialog').show(true); }
eoweb assembly version is 7.0.38.2 (yep, a bit old)-:
A workaround seems to be: function showDlg() { eo_GetObject('dlgMyDialog').show(true); }
$(document).ready(function(){ setTimeout(showDlg, 700); }
It works, but gives the user a small window to muck w/ the page before the modal dialog takes over. I can't get the delay below 700, so it feels like a race condition bug in EO to me...
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This is normal. You are calling showDlg before the dialog has been fully initialized. setTimeout is a solution, another solution is to handle the dialog's ClientSideOnLoad event and then show it in that event.
Thanks
|
|
Rank: Member Groups: Member
Joined: 11/13/2009 Posts: 22
|
I tried removing the jquery ready code and just using this client side: dlgMyDialog.ClientSideOnLoad = "showDlg";
And unfortunately, it still doesn't work on Chrome but works fine in FF/MSIE.
I put a javascript breakpoint in the showDlg() JS function and verified it does get called and goes into the EO JS code. The page looks like it has mostly loaded. Might be some weird Chrome optimization bug where the code isn't totally loaded when it calls this?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
We have confirmed this to be a problem on Safari and Chrome. In these two browsers ClientSideOnLoad is fired before certain internal data structure are properly initialized for the Dialog control.
The best way to work around this problem is to set the dialog's InitialState to Visible. That will automatically display the dialog as soon as the page loads. It should work on all major browsers.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 11/13/2009 Posts: 22
|
Thanks for confirming the bug and providing the workaround.
I can confirm the workaraound works fine in Chrome and still works in FF/MSIE :-)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Great. Thanks for confirming it works!
|
|