My bootstrap modal pop is not working is not working on shopify store

hi,

i am using bootstrap 4 model popup on my shopify store but it does not open when i click on the button of model the screen turns black but model does not show

below is the code which i use.

Launch demo modal
Modal title
×
...
Close Save changes
1 Like

I would debug by checking the console for errors, and inspecting the element. Maybe it’s popping up but stuck in display: none (by another CSS rule, or some JS not firing).

which method of CSS and js would i use??
i use tailwind CSS , Bootstrap and even custom js for poping up but facing same problem…

Hi,

I have the same problem. Using Bootstrap 4 and trying the basic Bootstrap examples from the website (https://getbootstrap.com/docs/4.5/components/modal/). I try them Bootstrap CSS + Jquery + Bootstrap JS have all been correctly installed in my theme.liquid file.

Every time I click a button or link to have the modal dialog box pop up, the background turns translucent black, but the actual window doesn’t load. I don’t know why the window doesn’t load. I also tried using other jquery modal components (https://jquerymodal.com/) and seem to have the same problem.

All my examples work fine when tried outside of Shopify.

I can only assume that somewhere Shopify is overriding the “modal” class and that is causing issues. Any help though would be MUCH appreciated!

Thanks!

1 Like

Someone found any solution on this?

1 Like

Hi there! This was happening to me as well but with Bootstrap 5.

In my case I have two stylesheets:

  1. The debut theme stylesheet
  2. The bootstrap 5 stylesheet (which I added on top of the previous one).

Because of that, sometimes I have conflicts. So basically, the only thing to do here is to delete the modal styles from the debut theme stylesheet.

I went to the line 4854 and there I got the modal class. I deleted the whole thing and that was it.

Hope that helps.

1 Like