# HG changeset patch
# User Dan
# Date 1280505738 14400
# Node ID 05b7645f12e69e872278d82617e332013571f747
# Parent 77accbee98f59fab08e691cc366b367fc5f64b1e
jBox now works when horizontally scrolled; fixed case matching inconsistency in autofill
diff -r 77accbee98f5 -r 05b7645f12e6 includes/clientside/static/autofill.js
--- a/includes/clientside/static/autofill.js Thu Jul 29 19:30:11 2010 -0400
+++ b/includes/clientside/static/autofill.js Fri Jul 30 12:02:18 2010 -0400
@@ -38,6 +38,7 @@
},
tableHeader: '
' + $lang.get('user_autofill_heading_suggestions') + ' |
',
showWhenNoResults: true,
+ matchCase: true,
noResultsHTML: '' + $lang.get('user_autofill_msg_no_suggestions') + ' |
'
});
}
diff -r 77accbee98f5 -r 05b7645f12e6 includes/clientside/static/dropdown.js
--- a/includes/clientside/static/dropdown.js Thu Jul 29 19:30:11 2010 -0400
+++ b/includes/clientside/static/dropdown.js Fri Jul 30 12:02:18 2010 -0400
@@ -391,7 +391,7 @@
function isOverObj(obj, bias, event)
{
- var fieldUL = new Object();
+ var fieldUL = {};
var dim = fetch_dimensions(obj);
var off = fetch_offset(obj);
fieldUL['top'] = off['top'];
@@ -399,13 +399,14 @@
fieldUL['right'] = off['left'] + dim['w'];
fieldUL['bottom'] = off['top'] + dim['h'];
+ var mouseX_local = mouseX + getXScrollOffset();
var mouseY_local = mouseY + getScrollOffset();
// document.getElementById('debug').innerHTML = '
Mouse: x: '+mouseX+', y:' + mouseY + '
' + document.getElementById('debug').innerHTML;
if(bias)
{
- if ( ( mouseX < fieldUL['left'] + 2 || mouseX > fieldUL['right'] - 5 ) ||
+ if ( ( mouseX_local < fieldUL['left'] + 2 || mouseX_local > fieldUL['right'] - 5 ) ||
( mouseY_local < fieldUL['top'] - 2 || mouseY_local > fieldUL['bottom'] - 2 ) )
{
return false;
@@ -413,7 +414,7 @@
}
else
{
- if ( ( mouseX < fieldUL['left'] || mouseX > fieldUL['right'] ) ||
+ if ( ( mouseX_local < fieldUL['left'] || mouseX_local > fieldUL['right'] ) ||
( mouseY_local < fieldUL['top'] || mouseY_local > fieldUL['bottom'] ) )
return false;
}
diff -r 77accbee98f5 -r 05b7645f12e6 includes/clientside/static/functions.js
--- a/includes/clientside/static/functions.js Thu Jul 29 19:30:11 2010 -0400
+++ b/includes/clientside/static/functions.js Fri Jul 30 12:02:18 2010 -0400
@@ -546,6 +546,30 @@
return position;
}
+function getXScrollOffset(el)
+{
+ var position;
+ var s = el || self;
+ el = el || document;
+ if ( el.scrollTop )
+ {
+ position = el.scrollLeft;
+ }
+ else if (s.pageYOffset)
+ {
+ position = self.pageXOffset;
+ }
+ else if (document.documentElement && document.documentElement.scrollLeft)
+ {
+ position = document.documentElement.scrollLeft;
+ }
+ else if (document.body)
+ {
+ position = document.body.scrollLeft;
+ }
+ return position;
+}
+
function setScrollOffset(offset)
{
window.scroll(0, offset);