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

Circular logic dependency when navigating cells via keyboard and using custom editor widgets #659

Open
WoozyG opened this issue Feb 6, 2018 · 0 comments

Comments

@WoozyG
Copy link
Contributor

WoozyG commented Feb 6, 2018

When a sheet is locked but has a few cells unlocked, and those cells have custom editors, the editor in a cell is not displayed when the selection is moved from a locked cell to an unlocked cell via the keyboard. Selecting the cell with the mouse does display the editor.

The problem is in SelectionHandler.onCellSelectedWithKeyboard(...). At the end it has these lines:

newSelectedCellSet();
spreadsheet.updateSelectedCellValues(column, row);

however, newSelectedCellSet() expects the selected cell values to already be changed, in particular the spreadsheet.cellLocked property. Since it still has the value from the previous selection, the logic doesn't flow properly.

However, just reversing the two lines causes a different problem, as the second line depends on the value of spreadsheet.customCellEditorDisplayed, which is set by the first call.

I have extended the component in my app to override the caller of this method and essentially repeat the first call after the second, but that's not the best solution. Since it works when clicking with the mouse, there should be a path to unifying the logic that behaves the same for keyboard and mouse navigation.

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

1 participant