summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-24 14:20:43 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-24 14:21:22 +0200
commit1a9d466ef31deba9a0d3bbe9e1e47351cbda976c (patch)
tree6a76df2412e5b5c9452e90fa2ba2887f390dfb26
parentf1c0c05223b26d589d1ed7bdce9df2a245179f15 (diff)
Fix bug where a message was opened in both preview pane and new window on double-click (#1489122)
-rw-r--r--CHANGELOG1
-rw-r--r--program/js/app.js10
2 files changed, 7 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 138cdf522..f6ae96300 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix bug where a message was opened in both preview pane and new window on double-click (#1489122)
- Fix fatal error when xdebug.max_nesting_level was exceeded in rcube_washtml (#1489110)
- Fix PHP warning in html_table::set_row_attribs() in PHP 5.4 (#1489094)
- Fix invalid option selected in default_font selector when font is unset (#1489112)
diff --git a/program/js/app.js b/program/js/app.js
index b6ffb5e51..7bdd98a61 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1552,7 +1552,7 @@ function rcube_webmail()
// start timer for message preview (wait for double click)
if (selected && this.env.contentframe && !list.multi_selecting && !this.dummy_select)
- this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200);
+ this.preview_timer = setTimeout(function() { ref.msglist_get_preview(); }, this.dblclick_time);
else if (this.env.contentframe)
this.show_contentframe(false);
};
@@ -1568,12 +1568,13 @@ function rcube_webmail()
var win = this.get_frame_window(this.env.contentframe);
- if (win && win.location.href.indexOf(this.env.blankpage)>=0) {
+ if (win && win.location.href.indexOf(this.env.blankpage) >= 0) {
if (this.preview_timer)
clearTimeout(this.preview_timer);
if (this.preview_read_timer)
clearTimeout(this.preview_read_timer);
- this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200);
+
+ this.preview_timer = setTimeout(function() { ref.msglist_get_preview(); }, this.dblclick_time);
}
};
@@ -1581,11 +1582,11 @@ function rcube_webmail()
{
if (this.preview_timer)
clearTimeout(this.preview_timer);
-
if (this.preview_read_timer)
clearTimeout(this.preview_read_timer);
var uid = list.get_single_selection();
+
if (uid && this.env.mailbox == this.env.drafts_mailbox)
this.open_compose_step({ _draft_uid: uid, _mbox: this.env.mailbox });
else if (uid)
@@ -4109,6 +4110,7 @@ function rcube_webmail()
var n, id, sid, ref = this, writable = false,
source = this.env.source ? this.env.address_sources[this.env.source] : null;
+ // we don't have dblclick handler here, so use 200 instead of this.dblclick_time
if (id = list.get_single_selection())
this.preview_timer = setTimeout(function(){ ref.load_contact(id, 'show'); }, 200);
else if (this.env.contentframe)