View Full Version : TreeEditor field size is wrong in IE 6

Jonathan Feinberg
22 Mar 2007, 5:45 AM
When I edit a tree node in IE 6, the text field is only a couple of pixels wide. The edit field is the expected size in Firefox. A complete test case follows.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<title>Tree Editor Bug</title>
<link rel="stylesheet" type="text/css" href="../static/ext/css/ext-all.css">
<script type="text/javascript" src="../static/yui-utilities.js"></script>
<script type="text/javascript" src="../static/ext-yui-adapter.js"></script>
<script type="text/javascript" src="../static/ext-all-debug.js"></script>
<script type="text/javascript">
Ext.debug.log = function() {};
Ext.BLANK_IMAGE_URL = '../static/ext/images/default/s.gif';
TreeBugDemo = function () {
return {
init: function() {
var tree = new Ext.tree.TreePanel('tree');
var root = new Ext.tree.TreeNode({ id: 'root' });
root.appendChild(new Ext.tree.TreeNode('Kid A'));
root.appendChild(new Ext.tree.TreeNode('Kid B'));
var editor = new Ext.tree.TreeEditor(tree, {allowBlank: false});
Ext.EventManager.onDocumentReady(TreeBugDemo.init, TreeBugDemo, true);
<div id="tree"></div>

Jonathan Feinberg
23 Mar 2007, 1:21 PM
Anyone confirm or deny?

24 Mar 2007, 8:31 AM
I just tried this in IE7 and there's no visual indication that you're editing in a text field. Doesn't seem to matter whether a doctype is included or not.

Jonathan Feinberg
28 Mar 2007, 9:04 AM
Jack, are you out there?

Since this bug is a show-stopper for me, I'd be willing to try and track it down myself. But if you're already on it, and will have a fix in N days, I can certainly wait. You could fill a book with what I don't understand about DHTML, so my help on the matter might be less valuable than you'd think. :)

5 Apr 2007, 11:03 AM
Im having this bug too in ie7, though only on the root node of a tree :S Any ideas?

13 Jun 2007, 12:06 AM
Try to set tree container width explicitly. td.clientWidth in IE returns 0 if the width is not set.