EasyUI Forum
April 29, 2024, 12:35:10 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: mask size issue with multiple closed dialogs defined  (Read 5533 times)
rickmus
Newbie
*
Posts: 8


View Profile Email
« on: June 30, 2015, 09:55:15 AM »

Hello,

I have several dialogs defined in the main body of my page, all of which are marked as closed.  As easyui does its default initialization, the vertical size it uses is based upon the call to getPageArea, which ends up being document.documentElement.scrollHeight.  As it processes each dialog, the scroll height continues to increase, despite the fact that the dialogs should not be increasing the overall page size.  When you display a dialog, the mask is much larger than the current document, so the browser creates scroll bars for the mask.

The fix I found was to set the mask to the current size when the dialog is opened ( the addition of the width and height fields below ):

         onOpen: function(){
            if (state.mask){
               state.mask.css({
                  display:'block',
                  zIndex: $.fn.window.defaults.zIndex++,
                  width: ( opts.inline ? state.mask.parent().width() : getPageArea().width ),
                  height: ( opts.inline ? state.mask.parent().height() : getPageArea().height )
               });
            }
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!