Skip to content

Commit f451cd6

Browse files
committed
Add bundle for next release 2.1.2
2 parents bee4a64 + f9aada3 commit f451cd6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

bundle.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Patternslib 2.1.1-dev
1+
// Patternslib 2.1.2
22

33
/**
44
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
@@ -33648,7 +33648,8 @@ define('pat-modal',[
3364833648

3364933649
_init_handlers: function() {
3365033650
var $el = this.$el;
33651-
$(document).on("click.pat-modal", ".close-panel", this.destroy.bind(this));
33651+
$(document).on("click.pat-modal", ".close-panel[type!=submit]", this.destroy.bind(this));
33652+
$(document).on("click.pat-modal", ".close-panel[type=submit]", this.destroy_inject.bind(this));
3365233653
$(document).on("keyup.pat-modal", this._onKeyUp.bind(this));
3365333654
if (this.options.closing.indexOf("outside")!==-1) {
3365433655
$(document).on("click.pat-modal", this._onPossibleOutsideClick.bind(this));
@@ -33715,6 +33716,13 @@ define('pat-modal',[
3371533716
}
3371633717
},
3371733718
destroy: function() {
33719+
var $el = this.$el;
33720+
// if working without injection, destroy right away.
33721+
$(document).off(".pat-modal");
33722+
$el.remove();
33723+
$('body').removeClass("modal-active");
33724+
},
33725+
destroy_inject: function() {
3371833726
var $el = this.$el;
3371933727
if ($el.find('form').hasClass('pat-inject') ) {
3372033728
// if pat-inject in modal form, listen to patterns-inject-triggered and destroy first

0 commit comments

Comments
 (0)