From 74052d49b9b8b12897a72c87445e5e6064c5001e Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 16 Jun 2014 12:01:30 +0200 Subject: [PATCH 1/3] Avoid scrolling when moving focus from a treelist widget (#1489929) --- program/js/treelist.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/program/js/treelist.js b/program/js/treelist.js index cce4d17fd..ea1729806 100644 --- a/program/js/treelist.js +++ b/program/js/treelist.js @@ -755,7 +755,7 @@ function rcube_treelist_widget(node, p) case 9: // Tab // jump to last/first item to move focus away from the treelist widget by tab var limit = rcube_event.get_modifier(e) == SHIFT_KEY ? 'first' : 'last'; - container.find('li[role=treeitem]:has(a)')[limit]().find('a:'+limit).focus(); + focus_noscroll(container.find('li[role=treeitem]:has(a)')[limit]().find('a:'+limit)); break; } @@ -788,6 +788,19 @@ function rcube_treelist_widget(node, p) } } + /** + * Focus the given element without scrolling the list container + */ + function focus_noscroll(elem) + { + if (elem.length) { + var frame = container.parent().get(0) || { scrollTop:0 }, + y = frame.scrollTop || frame.scrollY; + elem.focus(); + frame.scrollTop = y; + } + } + ///// drag & drop support From 9c513f44a2f0ee212ca9b298a90582db19f269b3 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 16 Jun 2014 12:30:08 +0200 Subject: [PATCH 2/3] Fix message list header spacings (#1489929) --- skins/larry/mail.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 48cbad085..6a2e3f440 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -492,7 +492,7 @@ table.messagelist.fixedcopy { .messagelist tr > .flag, .messagelist tr > .priority { width: 20px; - padding: 2px 3px; + padding: 2px 3px !important; } .webkit .messagelist tr > .attachment, @@ -512,7 +512,7 @@ table.messagelist.fixedcopy { } .messagelist tr > .threads, -.messagelist tr > .threads + td { +.messagelist tr > .threads + th { border-left: 0; } From 9749aeeb0bda83019c1872a72d438a19f9cb3085 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 16 Jun 2014 12:35:57 +0200 Subject: [PATCH 3/3] Avoid scrolling of lists and menus when navigating with cursor keys (#1489929) --- program/js/app.js | 2 +- program/js/treelist.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index ea7be4eac..82b69c4db 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1677,7 +1677,7 @@ function rcube_webmail() case 63232: // "up", in safari keypress case 63233: // "down", in safari keypress focus_menu_item(keyCode == 38 || keyCode == 63232 ? -1 : 1); - break; + return rcube_event.cancel(e); case 9: // tab if (this.focused_menu) { diff --git a/program/js/treelist.js b/program/js/treelist.js index ea1729806..1427c2480 100644 --- a/program/js/treelist.js +++ b/program/js/treelist.js @@ -739,7 +739,7 @@ function rcube_treelist_widget(node, p) if (li.length) { focus_next(li, (mod = keyCode == 38 || keyCode == 63232 ? -1 : 1)); } - break; + return rcube_event.cancel(e); case 37: // Left arrow key case 39: // Right arrow key