Screen grayed out on bootstrap modal close

Screen grayed out on bootstrap modal close

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();"

Subscribe to Phanindra Mangipudi

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe