10 examples of 'bootstrap modal close event' in JavaScript

Every line of 'bootstrap modal close event' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
208_handleModalClick() {
209 if(this.opened) {
210 this.close();
211 }
212}
88onClickClose() {
89 this.trigger('cancel');
90
91 this.close();
92}
265function modalClickHandler(event, instance) {
266 if(event.timeStamp - modalClickHandlerTS > 200 && (modalClickHandlerTS = event.timeStamp) && !cancelClick){
267 var target = event.srcElement || event.target;
268 if (instance.get('closableByDimmer') === true && target === instance.elements.modal) {
269 triggerClose(instance);
270 }
271 }
272 cancelClick = false;
273}
42function closeModal(ev, $modal) {
43 ev.preventDefault();
44 k.open_modal.removeClass('active');
45 $('#modal-overlay').remove();
46}
129private preventClosing(event: MouseEvent) {
130 event.stopPropagation();
131}
387_sendModalOpenedEvent() {
388
389 const modalOpenedEvent = new CustomEvent('bs.modal.opened', {
390 bubbles: true,
391 composed: true
392 });
393
394 this.dispatchEvent(modalOpenedEvent);
395}
130_handleAlertDismiss() {
131 this._fireCloseEvent();
132 this.show = false;
133}
30private emitOutsideClick() {
31 if (this.closeOutside) {
32 this.$emit("close");
33 }
34}
53closeModal(){
54 this.props.closeModal()
55}
309_handleModalDialogTransitionEnd() {
310
311 if(this._openTransition) {
312
313 this._sendModalOpenedEvent();
314 this._openTransition = false;
315
316 } else {
317
318 this._closeTransition = true;
319
320 if(this.backdrop) {
321 this._hideBackdrop();
322 } else {
323 this._dismissModal();
324 this._closeTransition = false;
325 this._sendModalClosedEvent();
326 }
327 }
328}

Related snippets