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
Undoing changes will scroll us back to the changed area in specific case #10639
Conversation
Launch the local version of documentation by running: npm run docs:review 1c1158e66159887a5c810c0bf9c0446b3dadf0c2 |
const isChangedSelection = selectedRow !== changedRow || selectedColumn !== changedColumn; | ||
|
||
// Performing scroll only when selection has been changed right after editing a cell. | ||
if (isInViewport === false && isChangedSelection === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the isChangedSelection
condition.
It is in line with this comment, but does not meet the requirements of the original post of https://github.com/handsontable/dev-handsontable/issues/115 (it does not require selecting a different cell before hitting cmd+z
)
Is this what we want to do with it?
cc: @evanSe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jansiegel the current implementation in line with the comment is correct, @wszymanski we want a code sandbox for @krzysztofspilka review before this is merged to develop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jansiegel the current implementation in line with the comment is correct, @wszymanski we want a code sandbox for @krzysztofspilka review before this is merged to develop.
Here you go: https://jsfiddle.net/916z0tvc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wszymanski we are good to merge
@jansiegel I need your ✅ |
Context
As the title says. For now, it meets the requirements only from the case described in the comment.
Please keep in mind that it moves vertically or horizontally only when there is such a need.
How has this been tested?
Manual tests with scrolling on both axes.
Types of changes
Related issue(s):
Affected project(s):
handsontable
@handsontable/angular
@handsontable/react
@handsontable/vue
@handsontable/vue3
Checklist: