Skip to content

Commit 8709ae5

Browse files
Fixed issue where ufModal's could not be opened if a previous ufModal had just been closed.
1 parent b179b4a commit 8709ae5

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## v.4.0.22-Alpha
44
- Fix issue where 'Change User Password' popup form couldn't handle specifying a new password.
5+
- Fixed issue where ufModal's could not be opened if a previous ufModal had just been closed. (#732)
56

67
## v.4.0.21-Alpha
78
- Implement reflow and column selector for tables (#670)

app/sprinkles/core/assets/local/core/js/uf-modal.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
this.modal.modal('show');
5454

5555
// Bind modal to be deleted when closed
56-
this.modal.on("hidden.bs.modal", $.proxy(function () {
57-
this.destroy();
58-
}), this);
56+
this.modal.on("hidden.bs.modal", function () { this.destroy(); }.bind(this));
5957

6058
this.$element.trigger('renderSuccess.ufModal');
6159
return data;
@@ -107,13 +105,13 @@
107105
* Destroys instance
108106
*/
109107
destroy: function() {
110-
// Remove the modal from the selector
108+
// Remove the modal from the DOM
111109
if (this.modal) {
112110
this.modal.remove();
113111
}
114112

115113
// Unbind any bound events
116-
this.$element.off('.' + this.pluginName);
114+
this.modal.off('.' + this.pluginName);
117115

118116
// Grab jQuery wrapped element before plugin destruction
119117
var $element = this.$element;

0 commit comments

Comments
 (0)