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

Unable to edit data, context-menu is all grayed-out #5669

Closed
sjenset opened this issue Dec 14, 2018 · 16 comments
Closed

Unable to edit data, context-menu is all grayed-out #5669

sjenset opened this issue Dec 14, 2018 · 16 comments

Comments

@sjenset
Copy link

sjenset commented Dec 14, 2018

Description

In Chrome Version 71.0.3578.98 (Official Build) (64-bit), after creating a dummy table (or, for that sake, a table with actual data) I am unable to edit any of the cells, and in the context-menu all options are grayed out.

Steps to reproduce

  1. See demo

Demo

https://codepen.io/anon/pen/zyrQpo?editors=1111

Your environment

@AMBudnik
Copy link
Contributor

Sorry @sjenset

but I wasn't able to get the same result. Did you get any error in the console? Do you use any addons? I do not think that in this case the Pro vs Home edition of Windows 10 matters.

3gif

@sjenset
Copy link
Author

sjenset commented Dec 14, 2018

Weird.

No console errors in codepen:

image

No console errors in inspector:

image

No active Chrome extensions:

image

@AMBudnik
Copy link
Contributor

Are you able to replicate the same behavior using our demos at https://handsontable.com/docs/6.2.1/demo-scrolling.html?

@sjenset
Copy link
Author

sjenset commented Dec 14, 2018

Yep

@AMBudnik
Copy link
Contributor

Please let me know what callbacks do you get here https://handsontable.com/docs/6.2.1/tutorial-using-callbacks.html when you try to edit a cell

calls

@sjenset
Copy link
Author

sjenset commented Dec 14, 2018

After clicking various cells (left-clicking as well as right-clicking to bring up the context-menu), the only info in the window on the right are the initial two lines:

0 @0.045 [afterCreateRow] 5, 1, "auto",
1 @0.208 [afterChange] null, "loadData",

UPDATE:
If I enable all callbacks, it is along the lines of:

2 @79.639 [beforeOnCellMouseOver] [object MouseEvent], {"row":0,"col":5}, {}, [object Object],
3 @79.641 [afterOnCellMouseOver] [object MouseEvent], {"row":0,"col":5}, {},
4 @80.494 [beforeOnCellContextMenu] [object MouseEvent], {"row":0,"col":5}, {},
5 @80.495 [beforeContextMenuShow] [object Object],
6 @80.559 [afterContextMenuShow] [object Object],
7 @80.565 [afterOnCellContextMenu] [object MouseEvent], {"row":0,"col":5}, {},
8 @82.127 [afterListen]
9 @82.129 [afterContextMenuHide] [object Object],
10 @82.261 [afterUnlisten]
11 @84.011 [beforeOnCellMouseOut] [object MouseEvent], {"row":0,"col":5}, {},
12 @84.012 [afterOnCellMouseOut] [object MouseEvent], {"row":0,"col":5}, {},

@budnix
Copy link
Member

budnix commented Dec 14, 2018

@sjenset What type of PC do you have? I've some assumptions that this can be related to this issue #5586. That issue changed behavior when the touch and regular mouse events are registered. Since v6.2.1 mousedown and mouseup events are used only on non-touchable devices.

Did your PC support both input methods, such as MS Surface?

@AMBudnik
Copy link
Contributor

So the context menu is triggered correctly but does not appear. Can you check if you have an element with className htContextMenu in the DOM?
For the editor, you should get handsontableInputHolder className element.
Maybe the elements are shifted or hidden.

@sjenset
Copy link
Author

sjenset commented Dec 14, 2018

Oh, it appears, it's just "disabled"

image

From the DOM:

I don't have any hits on handsontableInputHolder in my DOM though.

@sjenset
Copy link
Author

sjenset commented Dec 14, 2018

@budnix

@sjenset What type of PC do you have? I've some assumptions that this can be related to this issue #5586. That issue changed behavior when the touch and regular mouse events are registered. Since v6.2.1 mousedown and mouseup events are used only on non-touchable devices.

Did your PC support both input methods, such as MS Surface?

Yes, I am on a (docked) laptop which supports touch (on the screen, which is closed while it is in the dock), and I am using a regular, corded mouse for navigation :)

@AMBudnik
Copy link
Contributor

So the mystery is partially solved. I hope that we'll be able to fix it in no time.

Thank you for sharing and for the quick updates @sjenset

@AMBudnik AMBudnik added this to the January 2019 milestone Dec 14, 2018
@sjenset
Copy link
Author

sjenset commented Dec 17, 2018

Can confirm that cell-selection works when using the touch-screen on the device, great work tracking this one down :)

@budnix
Copy link
Member

budnix commented Dec 17, 2018

Ok, I've prepared a patch and built a bundle. @sjenset Can I ask you to test this fiddle? I have felt that this demo should work for you. It should work for both methods, using a touchscreen and with a plugged mouse.

budnix added a commit that referenced this issue Dec 17, 2018
This fix resolves an issue about not abling select a cell or edit a cell
on devices which support both input methods (a touchscreen with an
ability to plug in a mouse).

Issue: #5669
@sjenset
Copy link
Author

sjenset commented Dec 17, 2018

The fiddle works for selecting / editing cells. When tweaking it to support context-menu, I also get a working context-menu.

@budnix
Copy link
Member

budnix commented Dec 17, 2018

Wonderfull! 👍 Thanks for your prompt reply.

@budnix budnix mentioned this issue Dec 17, 2018
6 tasks
budnix added a commit that referenced this issue Dec 17, 2018
budnix added a commit that referenced this issue Dec 18, 2018
Rename function expression names to be more descriptive.

Issue: #5669
@AMBudnik
Copy link
Contributor

Again, thank you for sharing @sjenset

The issue has been fixed in v 6.2.2

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

3 participants