From f646c8ac5812e3dc20aaa05090f5fefe54b6d37e Mon Sep 17 00:00:00 2001 From: Hixie Date: Mon, 20 Apr 2015 11:45:33 -0700 Subject: [PATCH] Make the keyboard reappear when you tap on a text field after having dismissed the keyboard. - the keyboard service now has a showByRequest() method that invokes Android's InputMethodManager's imm.showSoftInput with no flags set. - the Input component calls through to the keyboard service's showByRequest() when it receives a pointer down. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1089163005 --- framework/components/input.dart | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/framework/components/input.dart b/framework/components/input.dart index c75bfb6aed9..8ed2f0d37c6 100644 --- a/framework/components/input.dart +++ b/framework/components/input.dart @@ -8,6 +8,7 @@ import '../editing/keyboard.dart'; import '../fn.dart'; import '../theme/colors.dart'; import '../theme/typography.dart' as typography; +import 'dart:sky' as sky; typedef void ValueChanged(value); @@ -82,10 +83,13 @@ class Input extends Component { children.add(new EditableText(value: _editableValue, focused: focused)); - return new Container( - style: _style, - inlineStyle: focused ? _focusedInlineStyle : null, - children: children + return new EventListenerNode( + new Container( + style: _style, + inlineStyle: focused ? _focusedInlineStyle : null, + children: children + ), + onPointerDown: (sky.Event e) => keyboard.showByRequest() ); } }