关闭模态灰色背景后仍然存在

时间:2023-01-04 19:41:11

I`m using Meteor and Materialize. Repo. On hosting.

我正在使用Meteor和Materialise。回购。在托管。

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

关闭模态后,灰色背景不会消失!您可以在“组”页面上查看它。您必须先创建组,然后单击“添加参与者”并关闭。你会看到它。关于文档的模态,您可以在materializecss.com找到。今天我用相同的模态创建“保留/删除组”按钮,我仍然面对这个错误。请帮帮我

Due to limitation, I can post just 2 links. Ask if something is not clear

由于限制,我只能发布2个链接。询问是否有不清楚的事情

2 个解决方案

#1


0  

You can use jQuery to hide it when its supposed to hide.

当它应该隐藏时,您可以使用jQuery来隐藏它。

$('.grayBackgroundClass').hide();

Also, for closing modals the code is

此外,关闭模式代码是

$('.modalClass').modal('hide');

#2


0  

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.

在标记中创建该对话框窗口后,创建了div.lean-overlay。查看代码中的某个位置,可能会运行一些代码3次。点击“关闭”后,只有3个叠加中的1个被移除。其他两个留在页面上。

Or you can hack it, just $('.lean-overlay').remove(); But, it`s not right way...

或者你可以破解它,只需$('。lean-overlay')。remove();但是,这不是正确的方式......

#1


0  

You can use jQuery to hide it when its supposed to hide.

当它应该隐藏时,您可以使用jQuery来隐藏它。

$('.grayBackgroundClass').hide();

Also, for closing modals the code is

此外,关闭模式代码是

$('.modalClass').modal('hide');

#2


0  

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.

在标记中创建该对话框窗口后,创建了div.lean-overlay。查看代码中的某个位置,可能会运行一些代码3次。点击“关闭”后,只有3个叠加中的1个被移除。其他两个留在页面上。

Or you can hack it, just $('.lean-overlay').remove(); But, it`s not right way...

或者你可以破解它,只需$('。lean-overlay')。remove();但是,这不是正确的方式......