Chromium Code Reviews| Index: chrome/browser/resources/bookmark_manager/js/main.js |
| diff --git a/chrome/browser/resources/bookmark_manager/js/main.js b/chrome/browser/resources/bookmark_manager/js/main.js |
| index d5e157fb5fb0758117cefaa7b93ad98fcba3c23e..8ff09857472e9e470fa84e5c88a4ec9eb82e1d2a 100644 |
| --- a/chrome/browser/resources/bookmark_manager/js/main.js |
| +++ b/chrome/browser/resources/bookmark_manager/js/main.js |
| @@ -824,6 +824,19 @@ function openItem() { |
| } |
| /** |
| + * Refreshes search results after delete or undo-delete. |
| + * This ensures children of deleted folders do not remain in results |
| + */ |
| +function updateSearchResults() { |
|
tfarina
2013/12/10 23:59:32
you need to get arv or dbeam to review the JS part
|
| + if (list.isSearch()) { |
| + // Refresh search results |
| + navigateTo(tree.items[0].id, updateHash); |
| + $('term').focus(); |
|
arv (Not doing code reviews)
2013/12/11 16:41:38
This is not very nice. Why are we changing focus h
d.halman
2013/12/13 21:04:07
This was a somewhat hacky way to force search resu
|
| + setSearch($('term').value); |
| + } |
| +} |
| + |
| +/** |
| * Deletes the selected bookmarks. The bookmarks are saved in memory in case |
| * the user needs to undo the deletion. |
| */ |
| @@ -845,6 +858,7 @@ function deleteBookmarks() { |
| // When all nodes have been saved, perform the deletion. |
| if (lastDeletedNodes.length === selectedIds.length) |
| performDelete(); |
| + updateSearchResults(); |
|
arv (Not doing code reviews)
2013/12/11 16:41:38
I don't understand this. Currently, if I'm deletin
d.halman
2013/12/13 21:04:07
I understand your other comments referring to upda
|
| }); |
| }); |
| } |
| @@ -874,6 +888,8 @@ function restoreTree(node, parentId) { |
| node.children.forEach(function(child) { |
| restoreTree(child, result.id); |
| }); |
| + |
| + updateSearchResults(); |
|
arv (Not doing code reviews)
2013/12/11 16:41:38
This one I think is needed (undo delete does not u
d.halman
2013/12/13 21:04:07
Would there be an efficient way to check restored
arv (Not doing code reviews)
2013/12/13 22:08:14
Not at the moment AFIAK.
|
| } |
| }); |
| } |