Improve how "no search results" is handled

* Drop the ugly height: 100% hack and do it properly and remove TODO
* after( $suggestions.show() ) seems to not work as expected in recent
  jQuery versions. Changed it to manipulate the presence of 'hide'
  class properly.
* Consistency fix in a comment
* Fixed a bug where creating multiple ULS instances would break the
  "no search results" functionality. This is because we were appending
  a jQuery element wrapped in a $(). This is obviously a no-op and a
  regression when the template actually was a string and not jQuery.
  Fixed by using clone() on it.

https://phabricator.wikimedia.org/T175233
This commit is contained in:
Niklas Laxström
2017-09-07 10:48:36 +02:00
parent e20c81a899
commit ca550e22cd
3 changed files with 8 additions and 12 deletions

View File

@@ -221,7 +221,7 @@
},
/**
* callback for results found context.
* Callback for results found context.
*/
success: function () {
this.$resultsView.show();