From 39e41aac6bc0dff30227e68437618c96307b5f0b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 6 Aug 2018 18:27:34 +0530 Subject: [PATCH] Auto select custom when changing the custom link color --- src/pyj/read_book/prefs/colors.pyj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pyj/read_book/prefs/colors.pyj b/src/pyj/read_book/prefs/colors.pyj index 01c2129f96..07e647af8a 100644 --- a/src/pyj/read_book/prefs/colors.pyj +++ b/src/pyj/read_book/prefs/colors.pyj @@ -201,7 +201,9 @@ def create_colors_panel(container): '\xa0\xa0', E.label(E.input(type='radio', name='link_color_type', value='custom'), _('Custom')), '\xa0', - E.input(name='link', type='color', value='#000000') + E.input(name='link', type='color', value='#000000', onclick=def (ev): + ev.currentTarget.parentNode.querySelector('[name=link_color_type][value=custom]').checked = True + ) )), ), E.div(style="display:flex; justify-content: flex-end; margin: 1ex 1em",