material icon indicating copy to clipboard operation
material copied to clipboard

$mdDialog.hide() - interimElement null

Open h0x539 opened this issue 11 years ago • 2 comments

The scenario:

I tried to open and close the modal 5 times, when I reached the 6 time, the remove function from "angular-material" created the promise with status 0 (pending), but it never called the callback function " $q.when(showDone).then(function())" from

remove: function() {
            self.cancelTimeout();
            return removeDone = $q.when(showDone).then(function() {
              var ret = element ? options.onRemove(options.scope, element, options) : true;
              return $q.when(ret).then(function() {
                if (!options.preserveScope) options.scope.$destroy();
                removeDone = true;
              });
            });
          }

When I tried to call hide function again, after the 6 step, it returns "interimElement" null from the stack and the modal is not removed from DOM.

h0x539 avatar Oct 30 '15 14:10 h0x539

Whenever possible, provide a CodePen demo.

To expedite resolution, please always test with the latest versions:

  • Angular Material HEAD
  • Bower Install - https://github.com/angular/bower-material/blob/master/angular-material.js
  • Bower Install - https://github.com/angular/bower-material/blob/master/angular-material.css
  • RAWGIT - https://rawgit.com/angular/bower-material/master/angular-material.js
  • RAWGIT - https://rawgit.com/angular/bower-material/master/angular-material.css
  • AngularJS Latest Release versions:
    • Angular 1.3.19 (or greater)
    • Angular 1.4.7 (or greater).

Can you confirm the issue still exists with the above versions ? I will reopen if needed.

ThomasBurleson avatar Oct 30 '15 16:10 ThomasBurleson

Thanks, Thomas! Everything works fine now.

h0x539 avatar Oct 31 '15 16:10 h0x539