diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-04-18 13:04:23 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-04-18 13:05:06 +0200 |
commit | 36a154e934b2e43fa24f2e177a5b6fe25b5eeffd (patch) | |
tree | 1ded4e134cd0e42f54a152d8070aadcd265cc73a | |
parent | e1e65c49803e5236a7b6e9527b90e5a894b02281 (diff) |
Fix next message display after removing a message (#1489800)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/js/common.js | 11 |
2 files changed, 9 insertions, 3 deletions
@@ -10,6 +10,7 @@ CHANGELOG Roundcube Webmail - Fix XSS issue in plain text spellchecker (#1489806) - Fix invalid page title for some folders (1489804) - Fix redundant alert message on over-size uploads (#1489817) +- Fix next message display after removing a message (#1489800) RELEASE 1.0.0 ------------- diff --git a/program/js/common.js b/program/js/common.js index 722eb3f60..72a68bb8b 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -327,13 +327,17 @@ removeEventListener: function(evt, func, obj) triggerEvent: function(evt, e) { var ret, h; + if (e === undefined) e = this; else if (typeof e === 'object') e.event = evt; - if (this._events && this._events[evt] && !this._event_exec) { - this._event_exec = true; + if (!this._event_exec) + this._event_exec = {}; + + if (this._events && this._events[evt] && !this._event_exec[evt]) { + this._event_exec[evt] = true; for (var i=0; i < this._events[evt].length; i++) { if ((h = this._events[evt][i])) { if (typeof h.func === 'function') @@ -356,7 +360,8 @@ triggerEvent: function(evt, e) } } - this._event_exec = false; + delete this._event_exec[evt]; + if (e.event) { try { delete e.event; |