After closing modal gray background remains

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

Answers (2)

Pavel Shalaev
Pavel Shalaev

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

Luna
Luna

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

Related Questions