jquery.suggestions: Load initial suggestions only when focused
authorFomafix <fomafix@googlemail.com>
Wed, 5 Jun 2019 06:01:36 +0000 (08:01 +0200)
committerFomafix <fomafix@googlemail.com>
Mon, 10 Jun 2019 13:41:47 +0000 (15:41 +0200)
commit97675af31ac1f8599e43530c23b71da26f1ba5ec
treef4dbb559fd3f0e7cb71dc47d6e4de64ae21eeb05
parente2ef870ee2da2940dc69a9c69fd2572039a606d4
jquery.suggestions: Load initial suggestions only when focused

Firefox restores the value of the search field on browser history back
on some special pages with OOUI search suggestions. In this case the
value of the search field gets also changed before JavaScript gets
initialized and the search suggestions get loaded.

This change loads the initial suggestions only when the search field is
focused and the value is changed before initializing JavaScript.

Bug: T224952
Change-Id: I30d334ae61b40666f14c2b6f82fe7f66ebc8fba0
resources/src/jquery/jquery.suggestions.js