EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: galcott on June 15, 2020, 09:33:48 PM



Title: Dialog is offscreen when length of page content is greater than browser height
Post by: galcott on June 15, 2020, 09:33:48 PM
When I open a dialog on a page where the length of the page content is greater than the height of the browser, it is centered relative to the page length, not the browser window, so it appears offscreen vertically and you have to scroll down to see it, which is obviously not acceptable. I call the move method to move it to a specific position and this works, but it seems like a bug that the vertical centering is positioning it offscreen. Is this a bug or is it intended?


Title: Re: Dialog is offscreen when length of page content is greater than browser height
Post by: jarry on June 16, 2020, 08:36:30 PM
Please call the 'center' method to make it display on the center of the screen.
Code:
$('#dlg').dialog('open').dialog('center');


Title: Re: Dialog is offscreen when length of page content is greater than browser height
Post by: galcott on June 16, 2020, 09:55:45 PM
I tried that, but it gets centered relative to the length of the content, and is still offscreen, probably in the same position it would have been without calling the center method. This definitely seems to be a bug, since there's no possible reason why you would want a dialog to be offscreen!


Title: Re: Dialog is offscreen when length of page content is greater than browser height
Post by: jarry on June 19, 2020, 08:25:42 PM
Please look at this example http://code.reloado.com/etuxij3/edit#preview. It works fine.


Title: Re: Dialog is offscreen when length of page content is greater than browser height
Post by: thecyberzone on July 22, 2020, 10:28:39 AM
I am facing same problem in case of messager.alert control, it goes out of viewport, after scrolling it becomes visible. Please help me.