mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 19:43:54 +02:00
Clicking selection bar buttons should not steal focus from iframe
This commit is contained in:
parent
cbdaad0003
commit
cbbcec8525
1 changed files with 4 additions and 1 deletions
|
|
@ -38,7 +38,10 @@ def build_bar(self, notes):
|
||||||
|
|
||||||
def cb(icon, tooltip, callback):
|
def cb(icon, tooltip, callback):
|
||||||
ans = svgicon(icon, '3ex', '3ex', tooltip)
|
ans = svgicon(icon, '3ex', '3ex', tooltip)
|
||||||
ans.addEventListener('click', callback)
|
ans.addEventListener('click', def(ev):
|
||||||
|
callback(ev)
|
||||||
|
self.view.focus_iframe()
|
||||||
|
)
|
||||||
ans.classList.add('simple-link')
|
ans.classList.add('simple-link')
|
||||||
ans.style.marginLeft = ans.style.marginRight = '0.5rem'
|
ans.style.marginLeft = ans.style.marginRight = '0.5rem'
|
||||||
return ans
|
return ans
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue