Spun out of T251664
Steps to replicate the issue (include links if applicable):
- Open https://en.m.wiktionary.org/wiki/Wiktionary:Main_Page#/search
- Focus the search input
- Inspect the input element
What happens?:
The search input should have autocapitalize="sentences" on it.
What should have happened instead?:
The search input should have autocapitalize="none" on it.
Problematic code: https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/e91457643827ecc3d79bd501bf428d5c8c0d75c5/resources/skins.minerva.scripts/search.js#L43 (see explanation below)
Developer notes
It seems like the behaviour of $( '#searchInput' ).prop( 'autocapitalize' ) differs on browser. On Firefox it returns undefined and on Chrome it returns "none".
autocapitalize acts like a property in Chrome (document.getElementById('searchInput').autocapitalize returns 'sentences' in Chrome but undefined in Firefox. According to specs it should probably be an attribute.
jQuery however is supposed to provide consistency between browsers so I wonder if this is an upstream jQuery bug?
Regardless, this should probably be changed to $( '#searchInput' ).attr( 'autocapitalize' )