Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Problem with modals without backdrop #974

Closed
iolevsky opened this issue Sep 9, 2013 · 0 comments
Closed

Problem with modals without backdrop #974

iolevsky opened this issue Sep 9, 2013 · 0 comments

Comments

@iolevsky
Copy link

iolevsky commented Sep 9, 2013

Using 0.6.0 and 1.2.0.rc2

On line 1469 of ui-bootstrap-pls.js the variable backdropDomEl is undefined if backdrop is set to false at config time:

var modalInstance = $modal.open({ backdrop: false })

This is not being checked for in the IF statement on the line before. So when modalInstance.close() is called you get: TypeError: Cannot call method 'remove' of undefined

My solution is check for undefined:

    if (backdropIndex() == -1 && backdropDomEl !== undefined) {
      backdropDomEl.remove();
      backdropDomEl = undefined;
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant