Screen grayed out on bootstrap modal close

TripsAndTricks Feb 26, 2016

UseCase

Sometimes when using the bootstrap modal dialog on click of Save/Submit button the modal-backdrop doesn't disappear or modal dialog does disappear correctly but opacity remains which remains screen is non-editable.

In this scenario use following code snippet on oncomplete for correct behaviour

onComplete="$('#divId').modal('hide');$('body').removeClass('modal-open');$('.modal-backdrop').remove();"

Phanindra Mangipudi

Salesforce, Lightning Web Componets, Node.Js, Angular 2+, Bootstrap