Hutchy68 / pivot

A MediaWiki mobile skin which "Pivots" seamlessly to any size display.
https://pivot.wikiproject.net
BSD 2-Clause "Simplified" License
37 stars 18 forks source link

Search autocomplete not available on small screens #85

Closed Amousey closed 4 years ago

Amousey commented 5 years ago

Version 2.1.0

Issue

Small screens have different functionality for searching, and unlike the regular screen sizes small screens do not use autocomplete. This makes searching more awkward.

Special:Search does autocomplete on small screens.

Setting autocomplete on in the php below for ul.side-nav has no effect

<input type="search" name="search" placeholder="<?php echo wfMessage( 'search' )->text() ?>" title="Search [alt-shift-f]" accesskey="f" id="searchInput" autocomplete="on">

Hutchy68 commented 5 years ago

autocomplete="on" is not for autocomplete on search. It is to remember the form content at a browser level. It should be left off.

Looks like we can use the mediawiki.searchSuggest.js of core as it allows for generic skin adaptation (CologneBlue) of multi search forms on same page as it is in Pivot.

Find

https://github.com/Hutchy68/pivot/blob/078f9c258c4869432256e03eba5af44a3f6768bd/Pivot.skin.php#L122

an change id="searchInput-offcanvas" to class="mw-searchInput"

and you can do the same in

https://github.com/Hutchy68/pivot/blob/078f9c258c4869432256e03eba5af44a3f6768bd/Pivot.skin.php#L167

Also, should designate

https://github.com/Hutchy68/pivot/blob/078f9c258c4869432256e03eba5af44a3f6768bd/Pivot.skin.php#L164

id="searchform" to id="searchform-sidebar"

Hutchy68 commented 4 years ago

Fixed with commit eb144a1. Pull develop branch to test it. Closing, reopen if necessary.