From baa4a1de40e66ce854c1101ed2e3e129371dbacd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 4 Feb 2016 16:56:21 +0530 Subject: [PATCH] ... --- src/pyj/book_list/search.pyj | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pyj/book_list/search.pyj b/src/pyj/book_list/search.pyj index 669a04a54c..84bc285afa 100644 --- a/src/pyj/book_list/search.pyj +++ b/src/pyj/book_list/search.pyj @@ -70,8 +70,11 @@ def init(self): # keyboard to popup and obscure the rest of the page # tb.focus() tb.setSelectionRange(0, tb.value.length) + self.tag_path = [] if not self.initial_load_started: self.refresh() + else: + self.render_tag_browser() def refresh(self): if self.currently_loading is not None: @@ -118,7 +121,7 @@ def process_node(node): self.tag_browser_data = tag_browser_data.root self.node_id_map = {} process_node(self.tag_browser_data) - self.render_tag_browser(container, clear_path=True) + self.render_tag_browser(container) else: show_error(xhr.error_html) @@ -129,9 +132,7 @@ def node_for_path(self, path): ans = ans.children[child_index] return ans - def render_tag_browser(self, container=None, clear_path=False): - if clear_path: - self.tag_path = [] + def render_tag_browser(self, container=None): container = container or self.tb_container clear(container) set_css(container, padding='1rem', display='flex', flex_wrap='wrap')