material-dashboard icon indicating copy to clipboard operation
material-dashboard copied to clipboard

Issues on windows

Open Flobbos opened this issue 6 years ago • 3 comments

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [x] I am running the latest version
  • [x] I checked the documentation and found no answer
  • [x] I checked to make sure that this issue has not already been filed
  • [x] I'm reporting the issue to the correct repository (for multi-repository projects)

Expected Behavior

I expect it to work on windows based computers.

Current Behavior

It doesn't work on windows based computers.

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Compile, fire up windows, load the dashboard in any browser and you will be greeted with:

TypeError: $(...).perfectScrollbar is not a function

In the console. The only way to fix this is to set isWindows to false so it doesn't try to load the perfectScrollbar.

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Device: PC
  • Operating System: Any flavor of windows
  • Browser and Version: Any browser

Flobbos avatar Jun 01 '19 20:06 Flobbos

I seem the same issue.

Probably, you need to include the /plugins/perfect-scrollbar.jquery.min.

moyaaaaaa avatar Mar 11 '20 13:03 moyaaaaaa

Hello there,

Thank you for using our products and for letting us know about this issue. Until we fix this into the next update, we will ask you to make the following changes:

  • [ ] go to assets/js/material-dashboard.js and delete function from line 18 to 29
  • [ ] paste this function instead:
(function() {
  isWindows = navigator.platform.indexOf('Win') > -1 ? true : false;

  if (isWindows) {
    // if we are on windows OS we activate the perfectScrollbar function
    var ps = new PerfectScrollbar('.sidebar');
    var ps1 = new PerfectScrollbar('.sidebar-wrapper');
    var ps2 = new PerfectScrollbar('.main-panel');
    var ps3 = new PerfectScrollbar('.main');
    $('html').addClass('perfect-scrollbar-on');

  } else {
    $('html').addClass('perfect-scrollbar-off');
  }
})();

Sorry for this inconvenience and hope this information helps you. Please let us know if we can help you with anything else.

All the best, Stefan

groovemen avatar Mar 11 '20 21:03 groovemen

Hello,

apologies for the very late reply but I kept setting the isWindows variable to false instead of using your proposed fix until today. Sadly, your fix doesn't work and there hasn't been an update so I was wondering if there is ever going to be a fixed release?

Thank you

Flobbos avatar Jan 02 '21 21:01 Flobbos