Fix hide event firing twice (#3898)
The setTimeout fires after the modal already hides so it ends up firing twice which causes an error because the element is no longer there:
```
Uncaught TypeError: Cannot read property 'get' of null
at Popup.triggerEvent (storm-min.js?v443:3732)
at Popup.hide (storm-min.js?v443:3741)
at storm-min.js?v443:3730
```
Credit to @Teranode for the fix.
This commit is contained in:
parent
bfd726f173
commit
7c919e01bc
|
|
@ -274,7 +274,6 @@
|
|||
// Wait for animations to complete
|
||||
var self = this
|
||||
setTimeout(function() { self.setBackdrop(false) }, 250)
|
||||
setTimeout(function() { self.hide() }, 500)
|
||||
}
|
||||
|
||||
Popup.prototype.triggerEvent = function(eventName, params) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue