View Full Version : [OPEN] [FIXED-252][3.0.x rev 5368] RowEditor buttons positioning problems

17 Sep 2009, 1:32 AM
Ext version tested:

Ext 3.0.x rev 5368

Adapter used:


css used:

only default ext-all.css

Browser versions tested against:

FF3.5.3 (firebug 1.5X.0a24)
Safari 4.0.3
Opera 9.64

Operating System:

Windows Server 2008


When you open RowEditor on a grid with lots of wide columns and
without forceFit - buttons positioning somewhere far away from the center of visible grid.
And you cannot press any button, cause they can't be seen.

Test Case:

Tested this issue on SVN version #5368 on the RowEditor sample (examples/grid/row-editor.html)

Steps to reproduce the problem:

Open example. Resize columns to be very wide (totalColumn width of all columns must be twice as big as grid width.
Open RowEditor. Try to press any button.
Try to scroll right the horizontal scrollbar of the grid and you'll see how buttons go away from the grid.

The result that was expected:

Buttons must be always on the center of the grid, for user to use them.

The result that occurs instead:

Buttons go somewhere, where RowEditor thinks there is the columns center, which can be far from the real visible area.

Screenshot or Video:

MustBe.jpg - This how it should work
Problem-2.jpg - Columns resized, buttons shifted right from center of the grid, 'Cancel'
button hided.
Problem-1.jpg - Columns resized, horizontal scrollbar scrolled right.

Debugging already done:


width = view.mainBody.getWidth(),
this element can be very big if columns are not fitting the grid view

Possible fix:

Used such code to fix :

positionButtons: function(){
var h = this.el.dom.clientHeight,
view = this.grid.getView(),
scroll = view.scroller.dom.scrollLeft,
//width = view.mainBody.getWidth(),
width = this.grid.getWidth(),
columns = this.grid.getColumnModel().getTotalWidth(),
bw = this.btns.getWidth();

width = width > columns ? columns : width;
this.btns.el.shift({left: (width/2)-(bw/2)+scroll, top: h - 2, stopFx: true, duration:0.2});

17 Sep 2009, 2:04 AM
Thanks for the report.

Fix applied to svn in rev #5369 for patch release 3.0.3.