Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: sky/framework/components/input.dart

Issue 1089163005: Make the keyboard reappear when you tap on a text field after having dismissed the keyboard. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Turns out you don't want the InputMethodManager.SHOW_FORCED flag set in this case. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/keyboard/org/chromium/mojo/keyboard/KeyboardServiceImpl.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import '../editing/editable_string.dart'; 5 import '../editing/editable_string.dart';
6 import '../editing/editable_text.dart'; 6 import '../editing/editable_text.dart';
7 import '../editing/keyboard.dart'; 7 import '../editing/keyboard.dart';
8 import '../fn.dart'; 8 import '../fn.dart';
9 import '../theme/colors.dart'; 9 import '../theme/colors.dart';
10 import '../theme/typography.dart' as typography; 10 import '../theme/typography.dart' as typography;
11 import 'dart:sky' as sky;
11 12
12 typedef void ValueChanged(value); 13 typedef void ValueChanged(value);
13 14
14 class Input extends Component { 15 class Input extends Component {
15 static final Style _style = new Style(''' 16 static final Style _style = new Style('''
16 display: paragraph; 17 display: paragraph;
17 transform: translateX(0); 18 transform: translateX(0);
18 margin: 8px; 19 margin: 8px;
19 padding: 8px; 20 padding: 8px;
20 border-bottom: 1px solid ${Grey[200]}; 21 border-bottom: 1px solid ${Grey[200]};
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 76
76 if (placeholder != null && _value.isEmpty) { 77 if (placeholder != null && _value.isEmpty) {
77 children.add(new Container( 78 children.add(new Container(
78 style: _placeholderStyle, 79 style: _placeholderStyle,
79 children: [new Text(placeholder)] 80 children: [new Text(placeholder)]
80 )); 81 ));
81 } 82 }
82 83
83 children.add(new EditableText(value: _editableValue, focused: focused)); 84 children.add(new EditableText(value: _editableValue, focused: focused));
84 85
85 return new Container( 86 return new EventListenerNode(
86 style: _style, 87 new Container(
87 inlineStyle: focused ? _focusedInlineStyle : null, 88 style: _style,
88 children: children 89 inlineStyle: focused ? _focusedInlineStyle : null,
90 children: children
91 ),
92 onPointerDown: (sky.Event e) => keyboard.showByRequest()
89 ); 93 );
90 } 94 }
91 } 95 }
OLDNEW
« no previous file with comments | « services/keyboard/org/chromium/mojo/keyboard/KeyboardServiceImpl.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698