mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix weirdness when closing customize individual shortcut panel
This commit is contained in:
parent
95c71e3cd0
commit
13e2bf077f
@ -63,13 +63,13 @@ def key_widget(key):
|
|||||||
def close_customize_shortcut(apply_changes):
|
def close_customize_shortcut(apply_changes):
|
||||||
container = get_container()
|
container = get_container()
|
||||||
container.firstChild.style.display = 'block'
|
container.firstChild.style.display = 'block'
|
||||||
|
container.lastChild.style.display = 'none'
|
||||||
if close_customize_shortcut.shortcut_being_customized:
|
if close_customize_shortcut.shortcut_being_customized:
|
||||||
for item in container.firstChild.querySelectorAll('[data-user-data]'):
|
for item in container.firstChild.querySelectorAll('[data-user-data]'):
|
||||||
q = JSON.parse(item.dataset.userData)
|
q = JSON.parse(item.dataset.userData)
|
||||||
if q.name is close_customize_shortcut.shortcut_being_customized:
|
if q.name is close_customize_shortcut.shortcut_being_customized:
|
||||||
item.scrollIntoView()
|
item.scrollIntoView()
|
||||||
break
|
break
|
||||||
container.lastChild.style.display = 'none'
|
|
||||||
if apply_changes:
|
if apply_changes:
|
||||||
shortcuts = v'[]'
|
shortcuts = v'[]'
|
||||||
for x in container.lastChild.querySelectorAll('[data-shortcut]'):
|
for x in container.lastChild.querySelectorAll('[data-shortcut]'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user