Jump to content

Wikipedia talk:Template index

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Search boxes not working?

[edit]

There are several search boxes on this page, but not all of them work as described. For example in the "Search" section, it says "As an alternative to using this index, you can search the Template namespace using the box below:". -- But this search box is searching in Wikipedia, not specifically in the Template namespace.


What's the intended difference between the different search boxes? Maybe I'm missing something, but they seem to all have the same purpose (but they don't all work). If that's the case, can they be fixed? Alternatively if they all have the same purpose, do they all really need to be on the page? BetsyRogers (talk) 21:44, 3 November 2025 (UTC)[reply]

@BetsyRogers, you seem to be editing from the mobile version of Wikipedia. Unfortunately, this is a known bug: phab:T402078. Text fields generated by custom <inputbox>...</inputbox> get completely overtaken by the search box at the top of the mobile version of the website. If you switch to the desktop version of the website, the custom search boxes will start to work for you (the very bottom of every page has blue link "Desktop" on the right side, after "Cookie statement" and "Terms of Use").
I tweaked the bottom of the three search boxes – now it refers to the "index" instead of the previous name of this page. —⁠andrybak (talk) 22:52, 3 November 2025 (UTC)[reply]
I also used template {{if mobile}} to hide the top search nox and to show a warning for the bottom two: Special:Diff/1320304800/1320307292. —⁠andrybak (talk) 23:06, 3 November 2025 (UTC)[reply]
Thank you. Yes, I'm using the mobile site, and that's exactly what's happening. BetsyRogers (talk) 19:58, 4 November 2025 (UTC)[reply]
Actually I just compared each of the search boxes to desktop view, and the first search box (just above "Using this page") *does* work in mobile view. The other two don't. I'm on Android v16 if that helps.
Is there something different in how the first box is set up? When I start typing it stays in an advanced search mode, with "templates" selected, and the search results are all templates.
The other two search boxes just "jump" and turn into the basic/simple Wikipedia search bar. BetsyRogers (talk) 20:02, 4 November 2025 (UTC)[reply]
I don't understand what you mean. The search box just above the section Wikipedia:Template index#Using this page (i.e. in the lede section of the page) should not be visible on the mobile website. I specifically made it hidden on the mobile website in Special:Diff/1320307292. —⁠andrybak (talk) 20:12, 4 November 2025 (UTC)[reply]
Sorry, I mean that I went to a previous version of the page, just to look again at the difference between the mobile & desktop view. And it turns out that first box actually works in mobile view too, at least on my device. I think I wasn't using that one very much, I was mostly using the ones in the "Search" section itself (the 2nd & 3rd). BetsyRogers (talk) 21:11, 4 November 2025 (UTC)[reply]
I did some testing at Special:Permalink/1317848098. As far as I can tell, the stealing of focus happens once per page load, which means that the user can work around the bug. Steps: 1) tap into search 2) focus-stealing bug happens 3) tap the website's "back" button to the left of the search's text field at the top 4) use the customized search as normal. —⁠andrybak (talk) 21:41, 4 November 2025 (UTC)[reply]
Oh wow. Ok that makes sense now that I think back. Every time I'd think I had figured out which of the search buttons on the page actually worked, the next time I'd use the same box, it wouldn't work and I just thought I was forgetting which one had worked the last time (which had me a bit worried that I kept forgetting). Thank you! An unfortunate situation but at least now I know what was going on. BetsyRogers (talk) 01:29, 5 November 2025 (UTC)[reply]