PDA

View Full Version : [CLOSED] [4.2.0] HtmlEditor causes roweditor width problem



cnelissen
28 Dec 2012, 10:56 AM
If you add an HtmlEditor to a page with a grid that has a row editor, the row editor will not fill the grid width. This same code runs fine on 4.1.1a.

To reproduce: Click one of the grid rows to edit and see the width of the editor. Remove the html editor and reload the page, and click on the grid row to edit, the editor will now fill the whole grid width.

Tested on Firefox 17.0.1 and Chrome 24.



<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ext4 Test File</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<script src="../../ext-all-debug.js"></script>
<script>
Ext.onReady(function() {
Ext.define('GroupItems', {
extend: 'Ext.data.Model',

fields: [
{name: 'group', type: 'string'},
{name: 'description', type: 'string'},
{name: 'notes', type: 'string'}
]
});

var viewport = Ext.create('Ext.Viewport', {
layout: 'anchor',
defaults: {
anchor: '100% 50%'
},
items: [{
xtype: 'form',
items: [{
xtype: 'htmleditor',
itemId: 'test',
name: 'test',
fieldLabel: ' Test',
allowBlank: false
}]
},{
xtype: 'gridpanel',
store: Ext.create('Ext.data.Store', {
model: 'GroupItems',
data: [{
'group': 'Group 1',
'description': 'Test Description 1',
'notes': 'Test Notes 1'
},{
'group': 'Group 1',
'description': 'Test Description 2',
'notes': 'Test Notes 2'
}]
}),

plugins: [{
ptype: 'rowediting',
clicksToEdit: 1
}],

columns: [{
text: 'Group',
dataIndex: 'group',
editor: {
xtype: 'textfield',
allowBlank: false
},
width: 125
},{
text: 'Description',
dataIndex: 'description',
editor: {
xtype: 'textfield',
allowBlank: false
},
width: 125
},{
text: 'Notes',
dataIndex: 'notes',
editor: {
xtype: 'textfield',
allowBlank: false
},
flex: 1
}]
}]
});
});
</script>
</head>
<body>
</body>
</html>

evant
28 Dec 2012, 2:25 PM
Thanks for the test case. I can confirm on the beta version, however in the latest code-base it runs ok. For now, I'll close this off, if you're still seeing the issue on the next beta refresh feel free to bump this thread.