r112894 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112893‎ | r112894 | r112895 >
Date:13:51, 2 March 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
include header in results top calculation

otherwise results show up slightly too high
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/opensearch.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/opensearch.js
@@ -93,10 +93,11 @@
9494 function writeResults( sections ) {
9595 var results = document.getElementById( 'results' ), suggestions, i,
9696 suggestionListener, section, suggestionsResult, link, label,
97 - sq = document.getElementById( 'sq' );
 97+ sq = document.getElementById( 'sq' ),
 98+ header = document.getElementById( 'header' );
9899
99100 results.style.display = 'block';
100 - var top = sq.offsetParent.offsetTop + sq.offsetHeight + sq.offsetTop + 1;
 101+ var top = sq.offsetParent.offsetTop + sq.offsetHeight + sq.offsetTop + 1 + header.offsetTop;
101102 results.style.top = top + 'px';
102103
103104 if ( !sections || sections.length < 1 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r112895update fixtures so tests do not break...jdlrobson13:59, 2 March 2012

Status & tagging log