Skip to content

Commit

Permalink
Deselect text on dictionary query
Browse files Browse the repository at this point in the history
  • Loading branch information
arianneorpilla committed Mar 5, 2021
1 parent d9da825 commit 3d5bfb3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ class _VideoPlayerState extends State<VideoPlayer> {
String clipboardText = clipboard.replaceAll("@usejisho@", "");
String lookupText = "No matches for \"$clipboardText\" could be queried";

_subtitleFocusNode.unfocus();

return Column(
children: [
Padding(
Expand All @@ -500,7 +502,6 @@ class _VideoPlayerState extends State<VideoPlayer> {
_currentWord.value = "";
_currentDefinition.value = "";
_currentReading.value = "";
_subtitleFocusNode.unfocus();
},
child: Container(
padding: EdgeInsets.all(16.0),
Expand All @@ -519,6 +520,8 @@ class _VideoPlayerState extends State<VideoPlayer> {
String readings = results[1];
String definitions = results[2];

_subtitleFocusNode.unfocus();

return Column(
children: [
Padding(
Expand All @@ -529,7 +532,6 @@ class _VideoPlayerState extends State<VideoPlayer> {
_currentWord.value = "";
_currentReading.value = "";
_currentDefinition.value = "";
_subtitleFocusNode.unfocus();
},
child: SingleChildScrollView(
child: Container(
Expand Down

0 comments on commit 3d5bfb3

Please sign in to comment.