fix: TextFormField onChanged event triggered multiple times when Korean input (#9644)
* fix: TextFormField onChanged event triggered multiple times when Korean input * logic fix for iOS * add comments * move 'onChanged' logic to handleSoftKeyboardInput
This commit is contained in:
parent
09083b3afa
commit
ace98d98ad
@ -242,12 +242,16 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle mobile virtual keyboard
|
async void handleSoftKeyboardInput(String newValue) {
|
||||||
void handleSoftKeyboardInput(String newValue) {
|
|
||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
_handleIOSSoftKeyboardInput(newValue);
|
// fix: TextFormField onChanged event triggered multiple times when Korean input
|
||||||
|
// https://github.com/rustdesk/rustdesk/pull/9644
|
||||||
|
await Future.delayed(const Duration(milliseconds: 10));
|
||||||
|
|
||||||
|
if (newValue != _textController.text) return;
|
||||||
|
return _handleIOSSoftKeyboardInput(_textController.text);
|
||||||
} else {
|
} else {
|
||||||
_handleNonIOSSoftKeyboardInput(newValue);
|
return _handleNonIOSSoftKeyboardInput(newValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user