Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #30706 from shamenchens/Bug1168256-MusicSearchInTi…
Browse files Browse the repository at this point in the history
…le-v22

Bug 1168256 - Fix search during scanning music in tile/list view
  • Loading branch information
rvandermeulen committed Jun 30, 2015
2 parents b39d4f5 + 934c941 commit 15e415e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/music/js/ui/views/list_view.js
Expand Up @@ -76,7 +76,8 @@ var ListView = {
hideSearch: function lv_hideSearch() {
this.searchInput.value = '';
// XXX: we probably want to animate this...
if (this.view.scrollTop < this.searchBox.offsetHeight) {
if (this.view.scrollTop < this.searchBox.offsetHeight &&
ModeManager.currentMode !== MODE_SEARCH_FROM_LIST) {
this.view.scrollTop = this.searchBox.offsetHeight;
}
},
Expand Down
5 changes: 3 additions & 2 deletions apps/music/js/ui/views/tiles_view.js
Expand Up @@ -57,7 +57,8 @@ var TilesView = {
hideSearch: function tv_hideSearch() {
this.searchInput.value = '';
// XXX: we probably want to animate this...
if (this.view.scrollTop < this.searchBox.offsetHeight) {
if (this.view.scrollTop < this.searchBox.offsetHeight &&
ModeManager.currentMode !== MODE_SEARCH_FROM_TILES) {
this.view.scrollTop = this.searchBox.offsetHeight;
}
},
Expand Down Expand Up @@ -147,7 +148,7 @@ var TilesView = {
if (!result.metadata.picture) {
container.appendChild(titleBar);
} else {
container.setAttribute('aria-label', artistName.textContent + ' ' +
container.setAttribute('aria-label', artistName.textContent + ' ' +
albumName.textContent);
}

Expand Down

0 comments on commit 15e415e

Please sign in to comment.