EasyUI Forum

General Category => Bug Report => Topic started by: jpierce on June 28, 2013, 03:00:57 PM



Title: window center placement on open after browser resize
Post by: jpierce on June 28, 2013, 03:00:57 PM
It looks like the window widget has a bit of a bug (or at least undesirable behavior) when it comes to browser resizing and centering.  If you resize a browser and then show a window that was already created and was set to center, the centering will be based on the size of the browser when the window was created (even if it has never been shown).

You can work around this by calling:

Code:
$('#w').window('center');
$('#w').window('open');

But you probably want something in open() that checks for centering and recalculates it.


Title: Re: window center placement on open after browser resize
Post by: stworthy on June 28, 2013, 07:27:53 PM
After resize the browser or window you need to call 'center' method to make window become center on screen again.
Code:
$('#w').window('open');
$('#w').window('center');