Skip to content

Commit 085a54a

Browse files
committed
fix crash: commit on focus out
1 parent 1ac33ca commit 085a54a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

iosfrontend/iosfrontend.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ void IosFrontend::focusIn(id client) {
2525
}
2626

2727
void IosFrontend::focusOut() {
28-
ic_->setClient(nil);
2928
ic_->focusOut();
29+
// Extracting client from nil crashes on Swift, so it has to be put after
30+
// ic_->focusOut, although commit on focus out doesn't work on iOS (even if
31+
// commit inside viewWillDisappear)
32+
ic_->setClient(nil);
3033
}
3134

3235
IosInputContext::IosInputContext(IosFrontend *frontend,

0 commit comments

Comments
 (0)