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

Cell Editor should not close on mouse clicks #510

Closed
swalters opened this issue Jun 25, 2013 · 1 comment
Closed

Cell Editor should not close on mouse clicks #510

swalters opened this issue Jun 25, 2013 · 1 comment

Comments

@swalters
Copy link
Contributor

When editing a cell, I can not right click to get my editor functions such as cut/copy/paste.

Also, I can't left click to move the caret.

Try to edit the name field and use mouse clicks
http://plnkr.co/edit/TC47qt?p=preview

This becomes a bigger issue on complex controls such as a number editor with a spinner. If I click the spinner controls, the editing stops. I can create a directive with

elm.bind('mousedown', function (evt) {
//prevent mousedown on spinner from stopping editing
evt.stopPropagation();
evt.preventDefault();
});

then the spinners don't work at all.

jonricaurte added a commit that referenced this issue Jun 26, 2013
Cell navigation broke due to there being an extra element in the cell.
Also changed the color of the focused cell to be different than selected
rows to be easier to identify. Fixed issue #510. Now when mouse clicking
within cell, rows won't keep being selected and deselected.
@jonricaurte
Copy link
Contributor

This should be fixed in 2.0.7 for inputs. You should use:

elm.bind('click', function(evt) { //stops rows from being constantly selected and deselected on mouse click events
evt.stopPropagation();
});

elm.bind('mousedown', function(evt) {
evt.stopPropagation(); //don't use preventDefault, only stopPropagation()
});

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

No branches or pull requests

2 participants