Reviewers: rdayal,
Description:
Rendering a blank space in an empty EditTextCell to force the element to
have a height. Otherwise, the EditTextCell is not clickable if it is
empty, and the user cannot select it to switch to edit mode.
Issue: 7247
Please review this at http://gwt-code-reviews.appspot.com/1708803/
Affected files:
M user/src/com/google/gwt/cell/client/EditTextCell.java
Index: user/src/com/google/gwt/cell/client/EditTextCell.java
===================================================================
--- user/src/com/google/gwt/cell/client/EditTextCell.java (revision 10970)
+++ user/src/com/google/gwt/cell/client/EditTextCell.java (working copy)
@@ -219,8 +219,14 @@
// The user pressed enter, but view data still exists.
sb.append(renderer.render(text));
}
- } else if (value != null) {
+ } else if (value != null && value.length() > 0) {
sb.append(renderer.render(value));
+ } else {
+ /*
+ * Render a blank space to force the rendered element to have a
height.
+ * Otherwise it is not clickable.
+ */
+ sb.appendHtmlConstant(" ");
}
}
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors