pkane

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • in reply to: Grid scrolls to top after selecting a cell #94339
    pkane
    Participant

    Here's a solution that is working for me:

    At line 346 of grid.celledit.js:

    var selection = $(“<span…

    Add “position:fixed;top:0px;left:0px” to the style attribute of the outer span.

    The inner span is the element which responds to the up/down/left/right keyboard events and moves the selected cell. To do this, it needs to have the focus. When it is given the focus, FF and IE scroll the browser, if necessary, so that it is visible. If you are editing a long grid, the browser may scroll up since the hidden span is inserted at the top of the grid. My proposed solution fixes the span to the viewport so that it's always “visible”, and the browser doesn't have to scroll.

Viewing 1 replies (of 1 total)

Stay connected with us in your favorite flavor!