creativetimofficial / ct-paper-dashboard-pro-react

17 stars 6 forks source link

[Bug] Layout Admin - All pages in layout admin goes out of container #9

Closed GSolari79 closed 4 years ago

GSolari79 commented 4 years ago

Version

1.0.0

Reproduction link

ask me about it through personal message

Operating System

Windows

Device

Chrome

Browser & Version

80.0.3987.116 (Official Build) (64-bit)

Steps to reproduce

Login and navigate to any page from a Windows 10 machine.

What is expected?

Content to be placed inside admin layout container and not overlapping.

What is actually happening?

The content are placed outside of main container of layout admin scrolling down way below the content.


Solution

I don't have a solution

Additional comments

The issue occurs only in windows machines. In Ubuntu with latest chrome and Mozila functions as expected.

einazare commented 4 years ago

Hello there, @GSolari79 ,

Thank you for your interest in working with our products and for following our rules of opening a Github issue. Does this solve your issue: https://github.com/creativetimofficial/ct-paper-dashboard-pro-react/issues/1

Best, Manu

GSolari79 commented 4 years ago

Thanks for the fast reply.

I did the changes proposed and it did not fix the way the scrollbar looks. My issues is different though and it occurs only when tested using windows 10.

Have a look at the screenshots:

print screen3 print screen2 print screen

GSolari79 commented 4 years ago

In Ubuntu the content is placed inside the container (light grey background):

correct

einazare commented 4 years ago

Hello again, @GSolari79 ,

Please go inside src/layouts/Admin.jsx and delete the following bits of code:

  componentDidMount() {
    if (navigator.platform.indexOf("Win") > -1) {
      document.documentElement.className += " perfect-scrollbar-on";
      document.documentElement.classList.remove("perfect-scrollbar-off");
      ps = new PerfectScrollbar(this.refs.mainPanel);
    }
  }
  componentWillUnmount() {
    if (navigator.platform.indexOf("Win") > -1) {
      ps.destroy();
      document.documentElement.className += " perfect-scrollbar-off";
      document.documentElement.classList.remove("perfect-scrollbar-on");
    }
  }

That will solve your issue.

Best, Manu

GSolari79 commented 4 years ago

Thanks a lot Manu for the immediate support. It resolved the issue!

Best regards, George