Skip to content

Last row will lose focus while edit after clicking #4422

@zuohaocheng

Description

@zuohaocheng

In the example given by tutorial 201, there's an issue that last row will lose focus, when clicking the input box in edit mode. It can be reproduced in Chrome & IE, as the procedure below:

  1. Scroll the grid to very bottom
  2. Double click on any editable cell, to enter edit mode
  3. Click anywhere inside the input box again
  4. Focus will be lost

The root cause of the issue is, commit 91077e8 which fixes #3128 disables scrolling by set grid.disableScrolling when clicking on input element again (step 3).

  • Disables scrolling will cause absence of scroller, which triggers resize of grid viewport.
  • Then, a scroll event will be triggered by browser, thus triggers scrollBegin
  • Event listener on scrollBegin(deregOnGridScroll) will get the event, and call endEdit to exit edit mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions