summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-04-18 13:04:23 +0200
committerAleksander Machniak <alec@alec.pl>2014-04-18 13:04:23 +0200
commit1db17abe7ea7f6931a13ebba48b310343f659140 (patch)
tree66a446bd3632594b0861c33d266b5bc3d0a8ddfc
parentc0b295f04b97b0543105dd6cd2c93b61342115c9 (diff)
Fix next message display after removing a message (#1489800)
-rw-r--r--CHANGELOG1
-rw-r--r--program/js/common.js11
2 files changed, 9 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 7f3d418a1..6482ca221 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -21,6 +21,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 2b20ff5ee..28f79d56f 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -330,13 +330,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')
@@ -359,7 +363,8 @@ triggerEvent: function(evt, e)
}
}
- this._event_exec = false;
+ delete this._event_exec[evt];
+
if (e.event) {
try {
delete e.event;