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
This commit is contained in:
Hixie 2015-04-20 11:45:33 -07:00
parent 33e9822625
commit f646c8ac58

View File

@ -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()
);
}
}