mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
focus editor area on drop so contents are saved
This commit is contained in:
parent
0b3291d589
commit
a878a5c7b4
1 changed files with 1 additions and 0 deletions
|
@ -990,6 +990,7 @@ class EditorWebView(AnkiWebView):
|
||||||
QWebView.dropEvent(self, new)
|
QWebView.dropEvent(self, new)
|
||||||
# tell the drop target to take focus so the drop contents are saved
|
# tell the drop target to take focus so the drop contents are saved
|
||||||
self.eval("dropTarget.focus();")
|
self.eval("dropTarget.focus();")
|
||||||
|
self.setFocus()
|
||||||
|
|
||||||
def prepareClip(self, mode=QClipboard.Clipboard):
|
def prepareClip(self, mode=QClipboard.Clipboard):
|
||||||
clip = self.editor.mw.app.clipboard()
|
clip = self.editor.mw.app.clipboard()
|
||||||
|
|
Loading…
Reference in a new issue