Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: [4.2.0 GA] GridViewDragDrop/TreeViewDragDrop causes scrolling on selection

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,017
    Vote Rating
    125
      2  

    Default [4.2.0 GA] GridViewDragDrop/TreeViewDragDrop causes scrolling on selection

    REQUIRED INFORMATION

    Ext version tested:

    • Ext 4.2.0 GA

    Browser versions tested against:
    • Chrome
    • IE9
    • FireFox

    DOCTYPE tested against:
    • <!DOCTYPE html>

    Description:

    Steps to reproduce the problem:
    • Scroll to the bottom
    • Select any row

    The result that was expected:
    • The scrollbar keeps its position

    The result that occurs instead:
    • The scrollbar jumps

    Test Case:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <title>GridViewDragDrop causes scrolling on selection</title>
    
        <link rel="stylesheet" href="../resources/css/ext-all.css" />
        
        <script src="../ext-all-debug.js"></script>
    
        <script>
            Ext.onReady(function () {
                var data = [],
                    i;
    
                for (i = 0; i < 50; i++) {
                    data[i] = { test: "test" + i };
                }
    
                Ext.create("Ext.grid.Panel", {
                    renderTo: Ext.getBody(),
                    width: 200,
                    height: 400,
                    store: {
                        fields: [{
                            name: "test"    
                        }],
                        data: data
                    },
                    columns: [{
                        text: "Test",
                        dataIndex: "test"
                    }],
                    viewConfig: {
                        plugins: {
                            ptype: "gridviewdragdrop"
                        }
                    }
                });
            });
        </script>
    </head>
    <body>
    
    </body>
    </html>
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

    On my Chrome (Mac) the scroll doesn't move but the scroll bar flashes so it tells me that something is happening there.

  3. #3
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,017
    Vote Rating
    125
      0  

    Default

    Thank you, Mitchell!

    Just to clarify: I tested on Windows 7.
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default

    I think this is happening for trees as well.

    I'm using the TreeViewDragDrop plugin and I have containerScroll set to true. When I scroll down and select a tree node the scrollbar jumps and, even more concerning, the itemclick event is not fired.

    I have not tried this without the plugin (or setting containerScroll to false) yet. I'll do this later tonight or on Friday.

  5. #5
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default

    I just tested this and found that setting containerScroll to false doesn't fix the issue. However, removing the plugin does fix the issue.

  6. #6
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,017
    Vote Rating
    125
      0  

    Default

    Hi @cruisencode,

    Thank you for the additional info. More info => more chanches to get the best fix.
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  7. #7
    Sencha User
    Join Date
    Jun 2008
    Posts
    138
    Vote Rating
    7
      0  

    Default

    Any updates on this bug? We are seeing the same issue with TreePanel and dragdrop plugin. In our case, it is causing users to double click on the wrong treenode. The first click moves the scrollbar so much that the 2nd click falls on another treenode. It is definitely worst in IE.

  8. #8
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,017
    Vote Rating
    125
      1  

    Default

    Working on a workaround/fix for this issue I discovered that initializing drag&drop a bit later than on the "render" event, i.e. on the "afterrender" one, helps remedy the problem. At least, for a grid.

    Code:
    Ext.grid.plugin.DragDrop.override({
        init : function(view) {
            view.on('afterrender', this.onViewRender, this, {single: true}); // "afterrender" instead "render"
        }
    });
    I didn't test with a tree, but I believe the following should also work.
    Code:
    Ext.tree.plugin.TreeViewDragDrop.override({
        init : function(view) {
            view.on('afterrender', this.onViewRender, this, {single: true}); // "afterrender" instead "render"
        }    
    });
    Well, I think it might be required to investigate the root of the problem, but, at least, it should not break anything and looks an absolutely appropriate workaround without having any backside effects.

    Could someone test and confirm?
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  9. #9
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default

    I'll have to test this when I get some time.

    Unfortunately, I didn't see this bug on the list for 4.2.1 Beta 1.

  10. #10
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default

    I just tested the tree fix and confirmed that it works.

    Thanks!

Page 1 of 2 12 LastLast

Posting Permissions

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