[FIX] web_responsive: Allow searching apps in mobile Chrome

This patch fixes #1251.

The keydown event is faked in mobile chrome because it's not something reliable due to today's virtual keyboards prediction features. Typing a <kbd>C</kbd> character doesn't mean it will be there when user uses autocorrection/autoguessing.

Instead of that, we use now the `keydown` event exclusively for movement features, and `input` event exclusively for content changes in the search input element.

Apart from fixing search in mobile Chrome, it also makes code more readable.

The search input also disables autocompletion since it would be useless and annoying here.
This commit is contained in:
Jairo Llopis
2019-04-15 10:30:53 +01:00
committed by Splash
parent 35678581b7
commit f567959665
2 changed files with 7 additions and 11 deletions

View File

@@ -30,6 +30,7 @@
</div>
</div>
<input type="search"
autocomplete="off"
placeholder="Search menus..."
class="form-control"/>
</div>