EasyUI Forum

General Category => Bug Report => Topic started by: rickmus on June 30, 2015, 09:55:15 AM



Title: mask size issue with multiple closed dialogs defined
Post by: rickmus 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 )
               });
            }