EasyUI Forum
May 09, 2024, 03:35:24 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: window center placement on open after browser resize  (Read 15723 times)
jpierce
Jr. Member
**
Posts: 73


View Profile
« 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.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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');
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!