Skip to content

bug: popup.close() not removing the popup element from DOM #4304

@avainola

Description

@avainola

Type: bug

Platform: all

In ionic 1.1 you have added !$ionicModal.stack.isHighest(self) condition to self.remove function.
if (self.removed) return; ---> if (self.removed || !$ionicModal.stack.isHighest(self)) return;
I run into a problem when I open a popup from click on another popup.
When first popup is opened:

  1. the self.show function is called and object is added to the $ionicModal.stack.
    When second popup is opened from click on the first popup:
  2. first popup self.hide is called and object is removed from $ionicModal.stack.
  3. second popup self.show is called and object is added to the $ionicModal.stack.
    When popup.close() is called on the second popup:
  4. first popup self.show is called and object is added to the $ionicModal.stack.
  5. second popup self.remove is called, but is returned, because $ionicModal.stack.isHighest(self) === false (first popup is the highest object on the stack)

I am not sure if i am somehow misusing it or it is a bug!?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions