Side note / Question:
Is there a method i can use to identify if a context menu was opened from a regular cell or a header cell? The reason i ask is because I’m trying to add a column rename input to the context menu, but only show it if the header was clicked. The bug reported is interfering with my workaround to achieve this (my workaround involves using the selected column index and looking for the class “ht__active_highlight”). Using selections does not help - the user could manually select all cells in a column, then right click for the context menu which is not the same as right clicking the header.
EDIT: To quote the documentation “Context menu with default options”: “Likewise, when the context menu for the column header is opened, the row options are disabled” - It looks like this uses selections too - and is also effected by the bug.
OK great, I’ll report bugs on the GitHub in the future. Thanks.
EDIT: If anyone else is interested, I’ve been incorrectly one of the 4 hot.getSelected() / getSelectedLast() / getSelectedRange() / getSelectedRangeLast() to get selections in the past. You use hot.selection (accessing the object not calling one of the functions) which has purpose built functions isSelectedByColumnHeader() and isSelectedByRowHeader(). It still suffers from the bug though.
e.g. hot.selection.isSelectedByColumnHeader().
I have good news! We’ve just released 8.0.0-beta2 that fixes the mentioned issue. We won’t be closing this ticket now. It will be closed after we release the final 8.0.0 version of Handsontable.