Fix ctrl+enter not working when importing screen first opened

Thanks to blueputty01 for investigating!

Closes #2326
This commit is contained in:
Damien Elmes 2023-01-18 15:41:47 +10:00
parent cf45cbf429
commit 0be9ee8dcc

View file

@ -46,7 +46,9 @@ class ImportCsvDialog(QDialog):
layout.addWidget(self.web)
self.setLayout(layout)
self.web.eval(f"anki.setupImportCsvPage('{path}');")
self.web.evalWithCallback(
f"anki.setupImportCsvPage('{path}');", lambda _: self.web.setFocus()
)
self.setWindowTitle(tr.decks_import_file())
def reject(self) -> None: