GiveToken / GiftBox

Repository for Sizzle
0 stars 0 forks source link

[1029] Fixes back button when interest dialog is open #1062

Closed shreydesai closed 8 years ago

shreydesai commented 8 years ago

The bug was caused by the interest dialog not closing and therefore preventing the user from interacting with the rest of the page. I used a boolean variable called openedInterestDialog to track whether the interest dialog was open. If it was and the back button was clicked, the interest dialog was closed first.

scope._onBackClick = function(event) {
  if (openedInterestPopup) {
    // close existing dialog box and then execute the
    // contents of the back button
    $('.interest-dialog').each(function(i, dialog) {
      dialog.close();
      openedInterestPopup = false;
    });
  }
  $('.gt-info-video').remove();
  this.$.pages.selected = 0;
};
shreydesai commented 8 years ago

Closing this pull request because there's some weird conflicts and I also want to target two issues, not just one. I'll open another one soon.