mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix comments editor widget in the edit metadata dialog swallowing Tab key presses, preventing the use of the keyboard to move between widgets.
This commit is contained in:
parent
c6e2cbac2e
commit
650ea67660
@ -382,17 +382,12 @@ class EditorWidget(QWebView): # {{{
|
|||||||
body.setAttribute('style', style)
|
body.setAttribute('style', style)
|
||||||
self.page().setContentEditable(not self.readonly)
|
self.page().setContentEditable(not self.readonly)
|
||||||
|
|
||||||
def keyPressEvent(self, ev):
|
def event(self, ev):
|
||||||
if ev.key() in (Qt.Key_Tab, Qt.Key_Escape, Qt.Key_Backtab):
|
if ev.type() in (ev.KeyPress, ev.KeyRelease, ev.ShortcutOverride) and ev.key() in (
|
||||||
|
Qt.Key_Tab, Qt.Key_Escape, Qt.Key_Backtab):
|
||||||
ev.ignore()
|
ev.ignore()
|
||||||
else:
|
return False
|
||||||
return QWebView.keyPressEvent(self, ev)
|
return QWebView.event(self, ev)
|
||||||
|
|
||||||
def keyReleaseEvent(self, ev):
|
|
||||||
if ev.key() in (Qt.Key_Tab, Qt.Key_Escape, Qt.Key_Backtab):
|
|
||||||
ev.ignore()
|
|
||||||
else:
|
|
||||||
return QWebView.keyReleaseEvent(self, ev)
|
|
||||||
|
|
||||||
def contextMenuEvent(self, ev):
|
def contextMenuEvent(self, ev):
|
||||||
menu = self.page().createStandardContextMenu()
|
menu = self.page().createStandardContextMenu()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user