Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Ant modal blocking background access

I'm using Ant modal in my react application, would appreciate if I can know the way to prevent modal popup disabling access to the background content. to remove the div tag it puts on top of the background.

regards

like image 920
Shivanka Avatar asked Sep 05 '26 09:09

Shivanka


1 Answers

Disclamer: I haven't ever worked with that library.


Any of its props doesn't seem to help but I did manage to hack it with CSS.

Be aware that future library updates could break this hack.

.ant-modal-mask {
  background: transparent;
  pointer-events: none;
}
.ant-modal-wrap {
  pointer-events: none;
}
.ant-modal {
  pointer-events: all;
}
like image 104
Solo Avatar answered Sep 07 '26 21:09

Solo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!