Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit: using cursor keys off end of edited text loses focus #3128

Closed
PaulL1 opened this issue Mar 26, 2015 · 3 comments
Closed

Edit: using cursor keys off end of edited text loses focus #3128

PaulL1 opened this issue Mar 26, 2015 · 3 comments
Assignees
Milestone

Comments

@PaulL1
Copy link
Contributor

PaulL1 commented Mar 26, 2015

On the edit tutorial with no cellNav: http://ui-grid.info/docs/#/tutorial/201_editable, if you start editing a cell then use the arrow keys to go to the end of the data, it will navigate off the end of the cell and lose focus (OSX and Chrome, in case this is OS/Browser dependent).

I think this is a duplicate, and will later look for the matching item.

@PaulL1 PaulL1 added this to the 3.0 milestone Mar 26, 2015
swalters added a commit that referenced this issue Jun 1, 2015
…at end of text in Chrome. This fix disables scrolling on grid until the editor is finished.
@swalters
Copy link
Contributor

swalters commented Jun 1, 2015

@PaulL1 after several iterations, my solution was to turn off grid scrolling while in edit mode. You can't ignore scroll events and Chrome is firing a scroll event for the parent container when you are at the end of the text. I think this is bad behavior from Chrome, but we probably have to live with it.

What I did was change the rendercontainer overflow style to hidden when editing. This has the effect of turning off scroll bars when in edit mode. What do you think?

You can see the fix here: https://github.com/angular-ui/ng-grid/tree/Fix-3128

@PaulL1
Copy link
Contributor Author

PaulL1 commented Jun 6, 2015

It sounds reasonable to me, if perhaps prone to giving us some sort of artefacts when the scrollbars come and go. I'm on a Mac so I don't see scrollbars anyway, so for me it works fine. When I turn scrollbars on it also works fine. I'd go ahead and merge it, one more defect off our list.

swalters added a commit that referenced this issue Jun 12, 2015
…ny scrolling of parent container.

  Chrome would automatically trigger a scroll when at the end of the text and there was no way to avoid it
@swalters
Copy link
Contributor

Scrollbars are removed from viewport if in deep edit to prevent any browser trigger scrolling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants