Results 1 to 2 of 2

Thread: [FIXED-252][3.0.x rev 5368] RowEditor buttons positioning problems

    You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Moscow
    Posts
    137

    Question [FIXED-252][3.0.x rev 5368] RowEditor buttons positioning problems

    Ext version tested:

    • Ext 3.0.x rev 5368



    Adapter used:

    • ext



    css used:

    • only default ext-all.css



    Browser versions tested against:

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



    Operating System:

    • Windows Server 2008



    Description:

    • 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:

    • RowEditor.js:362
      Code:
      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 :
      Code:
          positionButtons: function(){
              if(this.btns){
                  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});
              }
          },
    Attached Images Attached Images

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default

    Thanks for the report.

    Fix applied to svn in rev #5369 for patch release 3.0.3.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •