Explicitly float local search results left so they come first
authorFederico Leva <federicoleva@tiscali.it>
Wed, 16 Sep 2015 18:27:39 +0000 (20:27 +0200)
committerFederico Leva <federicoleva@tiscali.it>
Wed, 16 Sep 2015 18:32:37 +0000 (20:32 +0200)
Invert HTML output order; div#mw-search-interwiki already floats right
and this way it goes up only if there is enough space for it.
Clear both before the search pager, so that it stays where it is.
See https://phabricator.wikimedia.org/F2610402 for Chromium test.

Bug: T87631
Change-Id: Ieabb9ded4325e47a53a430c7af7d5b986bc20f2d

includes/specials/SpecialSearch.php
resources/src/mediawiki.special/mediawiki.special.search.css

index af2dc94..f727a9a 100644 (file)
@@ -369,14 +369,14 @@ class SpecialSearch extends SpecialPage {
                                $out->wrapWikiMsg( "==$1==\n", 'textmatches' );
                        }
 
-                       // show interwiki results if any
-                       if ( $textMatches->hasInterwikiResults() ) {
-                               $out->addHTML( $this->showInterwiki( $textMatches->getInterwikiResults(), $term ) );
-                       }
                        // show results
                        if ( $numTextMatches > 0 ) {
                                $out->addHTML( $this->showMatches( $textMatches ) );
                        }
+                       // show interwiki results if any
+                       if ( $textMatches->hasInterwikiResults() ) {
+                               $out->addHTML( $this->showInterwiki( $textMatches->getInterwikiResults(), $term ) );
+                       }
 
                        $textMatches->free();
                }
@@ -391,6 +391,7 @@ class SpecialSearch extends SpecialPage {
                        }
                }
 
+               $out->addHTML( '<div class="visualClear"></div>\n' );
                if ( $prevnext ) {
                        $out->addHTML( "<p class='mw-search-pager-bottom'>{$prevnext}</p>\n" );
                }
index 8f845df..b869314 100644 (file)
@@ -27,6 +27,7 @@ div.searchresult {
 }
 .mw-search-results {
        margin-left: 0.4em;
+       float: left;
 }
 .mw-search-results li {
        padding-bottom: 1.2em;