Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/110965
Change subject: mediawiki.searchSuggest: Only handle Vector's fulltext hack on
Vector
......................................................................
mediawiki.searchSuggest: Only handle Vector's fulltext hack on Vector
I'm not sure why I thought what I did would work, obviously
it won't. Let's just slap a class on the button.
Follow-up to I5fe0543e.
Change-Id: I1b3ff802ae0fc0fb9499a07068aefc2590ae3b66
---
M resources/mediawiki/mediawiki.searchSuggest.js
M skins/Vector.php
2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/65/110965/1
diff --git a/resources/mediawiki/mediawiki.searchSuggest.js
b/resources/mediawiki/mediawiki.searchSuggest.js
index 9fcd42a..3b360af 100644
--- a/resources/mediawiki/mediawiki.searchSuggest.js
+++ b/resources/mediawiki/mediawiki.searchSuggest.js
@@ -164,10 +164,7 @@
// make sure paste and cut events from the
mouse and drag&drop events
// trigger the keypress handler and cause the
suggestions to update
$( this ).trigger( 'keypress' );
- } )
- // If the forms include any fulltext search thingies,
remove them as they
- // would interfere with selecting suggestions
- .closest( 'form' ).find( '[name="fulltext"]' ).remove();
+ } );
// Ensure that the thing is actually present!
if ( $searchRegion.length === 0 ) {
@@ -197,6 +194,9 @@
$region: $searchRegion
} );
+ // If the form includes any fallback fulltext search buttons,
remove them
+ $searchInput.closest( 'form' ).find( '.mw-fallbackSearchButton'
).remove();
+
// In most skins (at least Monobook and Vector), the font-size
is messed up in <body>.
// (they use 2 elements to get a sane font-height). So, instead
of making exceptions for
// each skin or adding more stylesheets, just copy it from the
active element so auto-fit.
diff --git a/skins/Vector.php b/skins/Vector.php
index adf9003..b44b914 100644
--- a/skins/Vector.php
+++ b/skins/Vector.php
@@ -444,7 +444,7 @@
// * The mediawiki.searchSuggest module, after doing
tests for the broken browsers, removes
// the 'fulltext' button and handles 'fulltext'
search itself; this will reveal the 'go'
// button and cause it to be used.
- echo $this->makeSearchButton( 'fulltext', array( 'id'
=> 'mw-searchButton', 'class' => 'searchButton' ) );
+ echo $this->makeSearchButton( 'fulltext', array( 'id'
=> 'mw-searchButton', 'class' => 'searchButton mw-fallbackSearchButton' ) );
echo $this->makeSearchButton( 'go', array( 'id' =>
'searchButton', 'class' => 'searchButton' ) );
?>
</div>
--
To view, visit https://gerrit.wikimedia.org/r/110965
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b3ff802ae0fc0fb9499a07068aefc2590ae3b66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits