Author Topic: pqGrid Maximize leaves with and height style in Body tag  (Read 2566 times)

void

  • Newbie
  • *
  • Posts: 2
    • View Profile
pqGrid Maximize leaves with and height style in Body tag
« on: April 24, 2020, 08:27:03 am »
As mentioned in the subject, pqGrid leaves "width" and "height" CSS properties set inline in the Body tag, but I don't see any errors in the console.

Does anyone have any idea of why?  --Willing to share it.

Thank you.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: pqGrid Maximize leaves with and height style in Body tag
« Reply #1 on: May 04, 2020, 09:24:21 am »
It's part of the design.

void

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: pqGrid Maximize leaves with and height style in Body tag
« Reply #2 on: May 13, 2020, 10:06:16 pm »
It's part of the design.

I don't think I explained myself properly.  What I meant to say is that, once you restore the Grid to its original non-maximized state, the Body still has fixed dimensions set (via CSS).

Thus, if you resize the window, the body remains the same size (which now does not match its window), messing with the page design and any other content.

The feature seems potentially valuable for my user base so I'm testing a CSS workaround, it's just that this looks like a defect to me.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: pqGrid Maximize leaves with and height style in Body tag
« Reply #3 on: May 13, 2020, 10:48:47 pm »
Oh Ok, got it.

You can clear the inline height, width styles of body in pqgrid toggle event in order to fix it.

Code: [Select]
toggle: function(evt, ui){
if( ui.state == 'min' )
  $(document.body).css({
height: "",
width: ""
  });
}
« Last Edit: May 14, 2020, 04:53:49 pm by paramvir »