Results 1 to 2 of 2

Thread: EditorGridPanel on Mac scrolls to top after edit

  1. #1
    Ext User
    Join Date
    Oct 2009
    Vote Rating

    Default EditorGridPanel on Mac scrolls to top after edit


    We're using an EditorGridPanel to edit dubbing scripts (for cartoons), and have a problem on Mac (only) where it scrolls to top after committing a change to a cell. After a lot of testing I've been able to narrow it down to the TextArea object. For some columns in the script we only use a simple TextField, and when we perform updates there the grid does not scroll to the top. It's only when editing with a TextArea that it happens.

    The exact events are these: When closing the TextArea editor we send the updated data to our database (via the store update event). The grid scrolls up to the top, but the focus remains on the edited cell. After updating the database, we update the store with the data returned from the db (it performs some text cleaning), which causes the grid to scroll down again to the cell. (Interestingly, this scrolling down doesn't happen in ExtJS 3.0, only in 2.2.)

    I've tried adding an override to the ScrollToTop function as suggested elsewhere on the forum, but this does not help with this particular problem. I've also tried disabling all properties of the grid, the TextArea and the store, as well as disabling the store entirely. I've tried updating to ExtJs 3.0 (we're running 2.2) but that only made it worse (see above).

    The Mac(Book) on which we've tested this is running OS X 10.3.5 and Firefox 3.5.3. I'm not getting any errors from Firebug.

    I've tried searching quite a bit for this, both on the forums and on Google, but haven't found anything, so I hope I'm not repeating something.

    Please ask questions if there's something I've left out. Thank you.

  2. #2
    Ext User
    Join Date
    Oct 2009
    Vote Rating


    To confirm that the TextArea is to blame, I changed a simpler grid to use it instead of the TextField we normally use. I used it plain, with no properties, and still got the scrolling error.

    Here's the code for the simple(r) grid:

    function execCharacterDialog() {
      if (!characterwin) {
        var characterrec =[
          { name: 'character_id'},
          { name: 'original_name'},
          { name: 'translated_name'},
          { name: 'language'}
        var characterreader = new{
          id: "character_id"
        }, characterrec);
         characterstore = new{
          nocache : true,
          reader : characterreader,
          autoLoad : true,
          remoteSort: true,
          proxy : new{
            url : './getcharacters.php',
            method : 'GET'
          update: function(store, record, operation) {
            if (operation == {      
              var taskobj = {
                task: "update"
              var newobj = Ext.apply(taskobj,, {});
                waitMsg: 'Saving changes...',
                url: 'updatecharacter.php',    
                params: newobj,
                failure: function(response,options) {
            } else {
            return true; 
        var cm = new Ext.grid.ColumnModel([
            header: "Original",
            dataIndex: 'original_name',
            width: 230,
            resizable: false
            header: "Translated",
            dataIndex: 'translated_name',
            width: 230,
            resizable: false,
            editor: new Ext.form.TextArea({})
        var char_grid = new Ext.grid.EditorGridPanel({
          id: 'charactergrid',
          store: characterstore,
          cm: cm,
          stripeRows: true,
          enableHdMenu: false
        characterwin = new Ext.Window({
          applyTo: 'characterwindow',
          layout: 'fit',
          width: 500,
          height: 300,
          closeAction: 'hide',
          plain: true,
          buttons: [{
            text     : 'Close',
            handler  : function(){
          items: [char_grid]  

Posting Permissions

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