mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix text entry widgets' popup completion window not working well with windows on-screen keyboard. Fixes #1385586 [Autosuggest in text fields eats keystrokes from On-Screen Keyboard on Windows](https://bugs.launchpad.net/calibre/+bug/1385586)
This commit is contained in:
parent
e2cef589b7
commit
493aa66f36
@ -11,7 +11,7 @@ import weakref
|
||||
|
||||
import sip
|
||||
from PyQt5.Qt import (QLineEdit, QAbstractListModel, Qt, pyqtSignal, QObject, QKeySequence,
|
||||
QApplication, QListView, QPoint, QModelIndex, QFont, QFontInfo, QTimer)
|
||||
QApplication, QListView, QPoint, QModelIndex, QFont, QFontInfo)
|
||||
|
||||
from calibre.constants import isosx, get_osx_version
|
||||
from calibre.utils.icu import sort_key, primary_startswith, primary_contains
|
||||
@ -260,7 +260,7 @@ class Completer(QListView): # {{{
|
||||
return True
|
||||
elif etype == e.MouseButtonPress:
|
||||
if not self.rect().contains(self.mapFromGlobal(e.globalPos())):
|
||||
QTimer.singleShot(0, self.hide)
|
||||
self.hide()
|
||||
e.accept()
|
||||
return True
|
||||
elif etype in (e.InputMethod, e.ShortcutOverride):
|
||||
|
Loading…
x
Reference in New Issue
Block a user