Questions tagged [bootstrap-modal]

Bootstrap provides a JavaScript-powered dialog element that can be used to replace native dialogs (to a degree); unlike native dialogs, Bootstrap modals cannot block the flow of execution.

Bootstrap provides a JavaScript-powered dialog element that can be used to replace native dialogs (to a degree); unlike native dialogs, Bootstrap modals cannot block the flow of execution.

Dialogs can be manually triggered (using Bootstrap's .modal() function), or via data-attributes. Modals must be triggered on correctly-structured HTML templates, as shown in the linked documentation.

7716 questions
19
votes
6 answers

Open a Modal from another modal and close the first (launching) modal

I'm using Bootstrap Modal Window plugin its work fine but i would like to open another model window when i click next and close first one. how can i do it? $('[data-toggle="modal"]').click(function(e) { e.preventDefault(); var…
User
  • 243
  • 1
  • 2
  • 8
19
votes
7 answers

Load Bootstrap modal on page load without firing button or using jQuery

I'm trying to launch a Bootstrap modal on page load without firing a HTML button or using jQuery. Here's my code:
Sai Kiran Sripada
  • 1,149
  • 3
  • 15
  • 30
18
votes
2 answers

React: ResizeObserver loop completed with undelivered notifications

I'm seeing the following error when I dismiss a particular modal: This didn't happen when I was using react-router v5, but I've recently updated to v6 due to other requirements and it started happening. Funny thing is, I have a second page that…
rjray
  • 5,525
  • 4
  • 31
  • 37
18
votes
4 answers

Centered modal load spinner bootstrap 4

I want a modal load spinner and have based a test on Bootstrap 4's modal dialog box. However, I can't get the modal horizontally centered on the page. If possible, I would also like the modal to be with no borders and transparent (so it appears that…
Dr Ljotsson
  • 462
  • 1
  • 4
  • 14
18
votes
7 answers

Stop playing video in iframe when modal is closed

I have a play image with text 'Watch video', when clicked would open up a bootstrap modal window to play the video i put in. I've got the moday view to work. The problem I'm having with this is when I play the video and exit the screen while it is…
Michelle Ashwini
  • 910
  • 2
  • 13
  • 28
18
votes
3 answers

Can't click anything after i open my Bootstrap modal

sorry for the basic question, I'm working on MVC ASP.NET and I'm trying to add a bootstrap modal in my navbar, I run the code, i can see the button i can touch on it, but after it open, the screen is unclickable i have to f5 to click anywhere again,…
Franco Papalardo
  • 371
  • 1
  • 2
  • 18
18
votes
5 answers

Bootstrap 3.0.0 modal events not firing

I can't seem to get modal events working at all using Bootstrap 3. I want to perform an action when my modal closes, but nothing's happening. Here's my stripped back HTML:
17
votes
7 answers

JQuery click event not working in bootstrap modal

I have this line of code in my page:
...
Add more This line is actually in a bootstrap modal. I want that when a user clicks it, I want the div above it cloned. The issue is not the…
afaolek
  • 8,452
  • 13
  • 45
  • 60
16
votes
5 answers

bootstrap 5 close modal with vanilla javascript

Hello Following the tutorial here https://getbootstrap.com/docs/5.0/components/modal/#via-javascript they use a button to toggle showing the modal. And if you want to show a modal in bootstrap 5 with javascript you basically use var myModal = new…
noone392
  • 1,624
  • 3
  • 18
  • 30
15
votes
3 answers

Expression has changed error on Opening a Modal Popup inside a component

I have a parent component and i am passing some HTML from it to a child common component using @ViewChild(). When Child component loads up a popup. Console throws below error. "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed…
Aakash Kumar
  • 893
  • 4
  • 15
  • 38
15
votes
1 answer

Reusable remote modal Rails

I am trying to create a reusable remote modal. The idea is to create a model container and render content with yield into it and render content when needed. Note: all HTML code will be written in HAML. I am using bootstrap-modal-rails gem to handle…
Anton S.
  • 969
  • 1
  • 11
  • 29
15
votes
3 answers

How to correctly validate a modal form

I can't seem to get validation to work on my bootstrap modal, I have struggled with several of the examples that I have encountered. What is the correct way to validate a bootstrap modal? My HTML:
15
votes
3 answers

How clear bootstrap modal on hide

How to can you clear the bootstrap modal on dismiss/hide/close? I have the following Modal definition: Partial view which…
adam78
  • 9,668
  • 24
  • 96
  • 207
15
votes
1 answer

Bootstrap modal not showing. Only background becomes black

I am using bootstrap modal. The triggrer is like this: Add new and my modal:
Engineer
  • 5,911
  • 4
  • 31
  • 58
14
votes
3 answers

Open Bootstrap 4 Modal via JavaScript by clicking a link

I want to open a modal when I click on a link. Unfortunately I couldn't change the HTML of the link. I could only change the content of href. Like this: Open modal I could not add data-attributes or any other HTML. In the docs…
Cray
  • 5,307
  • 11
  • 70
  • 166