Disable double-click on the list when preview pane is on (#5199)

This eliminates delay when opening a message in preview pane.
pull/5530/head
Aleksander Machniak 8 years ago
parent 556c1725a7
commit 28741ed032

@ -1834,7 +1834,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(); }, this.dblclick_time);
this.preview_timer = setTimeout(function() { ref.msglist_get_preview(); }, list.dblclick_time);
else if (this.env.contentframe)
this.show_contentframe(false);
};
@ -1854,7 +1854,7 @@ function rcube_webmail()
if (this.preview_timer)
clearTimeout(this.preview_timer);
this.preview_timer = setTimeout(function() { ref.msglist_get_preview(); }, this.dblclick_time);
this.preview_timer = setTimeout(function() { ref.msglist_get_preview(); }, list.dblclick_time);
}
};
@ -2605,6 +2605,11 @@ function rcube_webmail()
if (page)
url._page = page;
// disable double-click on the list when preview pane is on
// this eliminates delay when opening a message in preview pane (#5199)
if (this.message_list)
this.message_list.dblclick_time = this.env.layout != 'list' ? 10 : this.dblclick_time;
this.http_request('list', url, lock);
this.update_state({ _mbox: mbox, _page: (page && page > 1 ? page : null) });
};
@ -5571,9 +5576,9 @@ function rcube_webmail()
selected = list.selection.length,
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
// we don't have dblclick handler here, so use 50 instead of this.dblclick_time
if (this.env.contentframe && (id = list.get_single_selection()))
this.preview_timer = setTimeout(function(){ ref.load_contact(id, 'show'); }, 200);
this.preview_timer = setTimeout(function(){ ref.load_contact(id, 'show'); }, 50);
else if (this.env.contentframe)
this.show_contentframe(false);

Loading…
Cancel
Save