mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
The Dart code uses -1 to signal that there is no current selection. If we get text input in this state, we need to do something reasonable. This patch teach us to treat that case as if the selection was zero. This patch also improves how we convert from NSString to string16 and makes it so we don't leak keyboard subviews. Fixes https://github.com/flutter/flutter/issues/1878