File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
- // Patternslib 2.1.1-dev
1
+ // Patternslib 2.1.2
2
2
3
3
/**
4
4
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
@@ -33648,7 +33648,8 @@ define('pat-modal',[
33648
33648
33649
33649
_init_handlers: function() {
33650
33650
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));
33652
33653
$(document).on("keyup.pat-modal", this._onKeyUp.bind(this));
33653
33654
if (this.options.closing.indexOf("outside")!==-1) {
33654
33655
$(document).on("click.pat-modal", this._onPossibleOutsideClick.bind(this));
@@ -33715,6 +33716,13 @@ define('pat-modal',[
33715
33716
}
33716
33717
},
33717
33718
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() {
33718
33726
var $el = this.$el;
33719
33727
if ($el.find('form').hasClass('pat-inject') ) {
33720
33728
// if pat-inject in modal form, listen to patterns-inject-triggered and destroy first
You can’t perform that action at this time.
0 commit comments