Skip to content

Commit

Permalink
Fix #777, modal duplicate window.confirm on close of modal form
Browse files Browse the repository at this point in the history
  • Loading branch information
seanupton committed Jun 14, 2017
1 parent 4e9101d commit d28449d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ New features:

Bug fixes:

- modal: Fixed duplicate window.confirm on form unload.
Fixes `issue 777 <https://github.com/plone/mockup/issues/777>`_.
[seanupton]

- formunloadalert: Fixed incorrect use of Function.prototype.apply,
when call() was seemingly intended; fixes case where modal close leads to
exception. Fixes `issue 776 <https://github.com/plone/mockup/issues/776>`_.
Expand Down
1 change: 1 addition & 0 deletions mockup/patterns/modal/pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ define([
}
self.$wrapper.remove();
if ($('.plone-modal', $('body')).size() < 1) {
self._suppressHide = undefined;
self.backdrop.hide();
$('body').removeClass('plone-modal-open');
$(window.parent).off('resize.plone-modal.patterns');
Expand Down

0 comments on commit d28449d

Please sign in to comment.