From 4ae28ff09fc6896ad35f824b8f63baa4cc10956b Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 29 Jan 2014 11:55:19 +0100 Subject: Also adapt fixed table header to vertical body scrolling --- program/js/common.js | 1 + program/js/list.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/program/js/common.js b/program/js/common.js index 9c0bb9db3..d320d86ec 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -65,6 +65,7 @@ function roundcube_browser() this.iphone = this.safari && (this.agent_lc.indexOf('iphone') > 0 || this.agent_lc.indexOf('ipod') > 0); this.ipad = this.safari && this.agent_lc.indexOf('ipad') > 0; this.opera = window.opera ? true : false; + this.webkit = this.safari || this.chrome; } if (!this.vendver) { diff --git a/program/js/list.js b/program/js/list.js index c49a8977c..c5ecf6c22 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -195,7 +195,12 @@ init_fixed_header: function() var me = this; $(window).resize(function(){ me.resize() }); - $(window).scroll(function(){ me.fixed_header.css({ 'marginLeft': (-$(window).scrollLeft()) + 'px' }) }); + $(window).scroll(function(){ + var w = $(window); + me.fixed_header.css('marginLeft', (-w.scrollLeft()) + 'px'); + if (!bw.webkit) + me.fixed_header.css('marginTop', (-w.scrollTop()) + 'px'); + }); } else { $(this.fixed_header).find('thead').replaceWith(clone); -- cgit v1.2.3