From abbed6e40cb30b857b155146b1e84ab7ae4c65d1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 5 Feb 2021 12:09:01 +0530 Subject: [PATCH] Also set this as event for title_action to match action --- src/pyj/book_list/top_bar.pyj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pyj/book_list/top_bar.pyj b/src/pyj/book_list/top_bar.pyj index bb845ef582..6760751001 100644 --- a/src/pyj/book_list/top_bar.pyj +++ b/src/pyj/book_list/top_bar.pyj @@ -78,7 +78,10 @@ def set_left_data(container, title='calibre', icon='heart', action=None, tooltip if callable(title_action): a = a.nextSibling - a.addEventListener('click', def(event): event.preventDefault(), title_action();) + a.addEventListener('click', def(event): + event.preventDefault() + title_action.bind(event)() + ) def set_title(container, text): bars = get_bars(container)