material-dashboard
material-dashboard copied to clipboard
Issues on windows
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
I seem the same issue.
Probably, you need to include the /plugins/perfect-scrollbar.jquery.min.
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
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