Reputation: 13
I`m using Meteor and Materialize. Repo. On hosting.
After closing modal, gray background not disappear! You can check it on Group page. You must create group first, then click "Add participant" and close. You`ll see it. About modals on documentation you can find at materializecss.com. Today I create "Leave/delete group" button with the same modal, and I still face with this bug. Help me please
Due to limitation, I can post just 2 links. Ask if something is not clear
Upvotes: 1
Views: 1944
Reputation: 11
After creating that dialog window in the markup have div.lean-overlay was created. See somewhere in your code, it`s possible, you run some code 3 times. And after click "close" only 1 of 3 overlays has removed. Other two stay on the page.
Or you can hack it, just $('.lean-overlay').remove(); But, it`s not right way...
Upvotes: 1
Reputation: 1178
You can use jQuery to hide it when its supposed to hide.
$('.grayBackgroundClass').hide();
Also, for closing modals the code is
$('.modalClass').modal('hide');
Upvotes: 0