summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-07-23 10:32:26 +0200
committerPetr Vobornik <pvoborni@redhat.com>2012-07-25 11:06:02 +0200
commit123573912270dd28871766d235ed9f2f15216363 (patch)
treec3940ede80943e9cf7b57b4327b651464196f908 /install
parent65bd82eaa1a0d8e377b58ebc6b5d96ea9364c993 (diff)
downloadfreeipa-123573912270dd28871766d235ed9f2f15216363.tar.gz
freeipa-123573912270dd28871766d235ed9f2f15216363.tar.xz
freeipa-123573912270dd28871766d235ed9f2f15216363.zip
Fix autoscroll to top in tables in IE
In IE when a window is small (horizontal scrollbar is displayed) click or keyboard input on various parts of UI makes search tables scroll to top. It prevents from selecting items in a table. This issue happens when using absolute positioned element with overflow style. It's a bug in IE. Two workarounds were added to make UI usable in IE. Adding position:relative; style to body element fixes the problem in search pages. It doesn't help in association dialogs though. The bug doesn't occur when some child element has focus. It's possible to set focus to first visible checkbox while scrolling down but user experience is very bad. Better solution seems to scroll back when IE scrolls to top on mousedown. That way mouse click event happens on the target element and it can gain focus and therefore be selected. Some glitches still remains but is usable. https://fedorahosted.org/freeipa/ticket/2835
Diffstat (limited to 'install')
-rw-r--r--install/ui/ipa.css1
-rw-r--r--install/ui/widget.js12
2 files changed, 13 insertions, 0 deletions
diff --git a/install/ui/ipa.css b/install/ui/ipa.css
index 76ce265f0..4f9d35c1d 100644
--- a/install/ui/ipa.css
+++ b/install/ui/ipa.css
@@ -39,6 +39,7 @@ html {
body {
overflow: auto;
+ position: relative;
background: url(images/outer-background.png);
background-repeat: repeat-x;
background-position: left top;
diff --git a/install/ui/widget.js b/install/ui/widget.js
index 0889ee0be..41767118e 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -1371,6 +1371,18 @@ IPA.table_widget = function (spec) {
that.tbody = $('<tbody/>').appendTo(that.table);
+ // workaround for #2835
+ if ($.browser.msie) {
+ that.tbody.mousedown(function(event) {
+ that.scroll_top = that.tbody.scrollTop();
+ window.setTimeout(function() {
+ if (that.tbody.scrollTop() === 0) {
+ that.tbody.scrollTop(that.scroll_top);
+ }
+ }, 0);
+ });
+ }
+
if (that.height) {
that.tbody.css('height', that.height);
}