Auto select custom when changing the custom link color

This commit is contained in:
Kovid Goyal 2018-08-06 18:27:34 +05:30
parent d18cf87693
commit 39e41aac6b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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",