creativetimofficial / ct-material-dashboard-pro-angular

68 stars 35 forks source link

[Bug] Modal not working on windows but working on mac #402

Closed guillermoeuillades closed 2 years ago

guillermoeuillades commented 2 years ago

Version

2.7

Reproduction link

https://demos.creative-tim.com/material-dashboard-pro-angular2/#/components/notifications

Operating System

WIndows Server 2012

Device

PC

Browser & Version

Chrome 100.0.4896.75

Steps to reproduce

go to componets->notifications (https://demos.creative-tim.com/material-dashboard-pro-angular2/#/components/notifications) by clicking on the buttons "classic modal"

What is expected?

should apper the modal

What is actually happening?

the screen fade but the modal it doen´t appear.


Solution

this is not a solution beacause is a manual change using chrome inspector. if I change (in chorme inspector) the line <div id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" class="modal fade"> to <div id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" class="modal fade show" aria-modal="true" style="padding-right: 15px; display: block;">

the modal appear.

Additional comments

Chrome and Firefox on Windows fail. Chrome and Firefox on mac works.

guillermoeuillades commented 2 years ago

I found a solution by adding $('.modal').removeClass('fade') before call $('#myModal').modal("show").

In order to apply only for windows I use:

if (navigator.platform.indexOf('Win') != -1) $('.modal').removeClass('fade'); $('#myModal').modal("show");

Thanks @timcreative for no support.