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

Focus not set on element when right click #482

Closed
dbarrett84 opened this issue Dec 7, 2016 · 6 comments
Closed

Focus not set on element when right click #482

dbarrett84 opened this issue Dec 7, 2016 · 6 comments
Assignees
Labels

Comments

@dbarrett84
Copy link

dbarrett84 commented Dec 7, 2016

I have added the context menu on a table element within a contenteditable area.

When I right click it shows the correct context menu, BUT the selected element is not updated because the right click has stopped propagation and therefore my options in the menu are being applied to the wrong element.

See for example:
https://jsfiddle.net/dbarrett84/s4j64Lo7/1/

Right click in the column heading and then in caption, cursor doesn't move to the caption it stays in the column heading cell.

@bbrala
Copy link
Member

bbrala commented Dec 9, 2016

Hmm, i see what you mean. Seems the problem is propably this code. It doesn't really click, but finds the target based on the position.

I might be able to do that differently so it wont stop there without breaking the code. I'll try and have a look soon.

@bbrala bbrala added the Bug label Dec 9, 2016
@bbrala bbrala self-assigned this Dec 9, 2016
@robfenlon
Copy link

Hi, I have a PR up that will fix this issue for contenteditable elements:
#486
Thanks!

@bbrala
Copy link
Member

bbrala commented Dec 12, 2016

Thanks for making PR available for this. @dbarrett84 think you can have a look if that PR fixes it for you?

@dbarrett84
Copy link
Author

Ya looks good, fixes my issue.

@bbrala
Copy link
Member

bbrala commented Dec 15, 2016

Merged your PR, thanks!

@bbrala bbrala closed this as completed Dec 15, 2016
@dbarrett84
Copy link
Author

Excellent, thanks very much Björn and Rob!

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

No branches or pull requests

3 participants