Fixed columns : locking columns can alone scroll on IE

Fixed columns : locking columns can alone scroll on IE

wjbwjb Posts: 3Questions: 1Answers: 0

I see a lot of similar problems, but I can not find a solution.
I tested in ie11 ~ 8 will appear
I looked at other solutions to the same problem,use the night version,but still there will be such a situation.
The specific operation is to use the mouse to drag the scroll bar to the bottom or the top, and then use the mouse wheel sliding lock column, the other columns will not follow the rolling

http://live.datatables.net/ekajav/10/edit

Answers

  • wjbwjb Posts: 3Questions: 1Answers: 0
    edited August 2017

    Now I find that this happens when you drag the scroll bar with the mouse later

  • wjbwjb Posts: 3Questions: 1Answers: 0
    // When the mouse is down (drag scroll) the mouse controller cannot
    // change, as the browser keeps the original element as the scrolling one
    $(this.s.dt.nTableWrapper).on( 'mousedown.DTFC', function () {
        mouseDown = true;
    
        $(document).one( 'mouseup', function () {
            mouseDown = false;
        } );
    } );    
    
    ...
    if ( that.s.iLeftColumns > 0 ) {
        // When scrolling the left column, scroll the body and right column
        $(that.dom.grid.left.liner)
            .on( 'mouseover.DTFC touchstart.DTFC', function () {
                if ( ! mouseDown ) {
                    mouseController = 'left';
                }
            } )
            .on( 'scroll.DTFC', function ( e ) {
                if ( ! mouseController && e.originalEvent ) {
                    mouseController = 'left';
                }
    
                if ( mouseController === 'left' ) {
                    that.dom.scroller.scrollTop = that.dom.grid.left.liner.scrollTop;
                    if ( that.s.iRightColumns > 0 ) {
                        that.dom.grid.right.liner.scrollTop = that.dom.grid.left.liner.scrollTop;
                    }
                }
            } )
            .on( wheelType, function(e) {
                // Pass horizontal scrolling through
                var xDelta = e.type === 'wheel' ?
                    -e.originalEvent.deltaX :
                    e.originalEvent.wheelDeltaX;
                that.dom.scroller.scrollLeft -= xDelta;
            } );
    }
    
    

    I check the code,It's as if IE didn't trigger the mouseup event change mouseDown,
    cause left gird touchstart event mouse controller cannot change left

  • rajusaforumrajusaforum Posts: 4Questions: 0Answers: 0

    Did you find any solution to the problem? I am experiencing the same issue with IE 11. Chrome seems to be working well.

  • rajusaforumrajusaforum Posts: 4Questions: 0Answers: 0

    I used the below as workaround for IE users alone. It just doesn't allow the fixed columns to be scrolled.

    if (/MSIE (\d+.\d+);/.test(navigator.userAgent) || navigator.userAgent.indexOf("Trident/") > -1) {
    $(document).on('mousewheel', '.DTFC_LeftWrapper', function () {
    return false;
    });
    }

This discussion has been closed.