mw.widgets.CategorySelector: Indicate pending requests and abort useless ones
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 9 Oct 2015 13:05:53 +0000 (15:05 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 9 Oct 2015 14:01:48 +0000 (14:01 +0000)
commit49ecc302fccb2ec372e4955369ad3d3d549bcc1a
treea476b172fa5d75434e2abd01bb4a2773aa48a3aa
parent81171ab3eb6f8f82e9669585efb45fc665b65bb4
mw.widgets.CategorySelector: Indicate pending requests and abort useless ones

* When the input loses focus, or when we fire new queries, abort
  any current ones.
* Never display the menu after input loses focus.
* Use PendingElement to indicate that we're waiting for responses.
  (Depends on I604fff9a9e5bfbb584b3926802dab445e6131aaa in OOjs UI
  for correct styling.)
* Do not send needless queries for empty input.

Bug: T114945
Change-Id: I80f4d0143279f1768ed2a3bdcb3f731526597577
resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js