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

Disable undo if change wasn't made #4072

Closed
AMBudnik opened this issue Feb 13, 2017 · 5 comments

Comments

@AMBudnik
Copy link
Contributor

commented Feb 13, 2017

Description

Currently when we hit ENTER to turn cell into edit mode without changing its content we add it to the undo stock. In the result when we want to undo changes we undo unchanged cell.

Steps to reproduce

  1. Type anything in B2
  2. Hit ENTER (to confirm)
  3. Hit ENTER twice (this will open and close cell B3
  4. Use context menu (or CTRL + Z) to undo changes

As you can see you have to use the undo twice to undo changing B2.

example2

Demo

http://jsfiddle.net/handsoncode/o7erkndt/

Your environment

  • Handsontable version: 0.30.1
  • Browser Name and version: Chrome 55
  • Operating System: Windows 10

@krzysztofspilka krzysztofspilka added this to the Backlog milestone Feb 21, 2017

@AMBudnik

This comment has been minimized.

Copy link
Contributor Author

commented Jan 19, 2018

Works the same in 0.35.0. Updated demo http://jsfiddle.net/46kwyg1e/

@AMBudnik

This comment has been minimized.

Copy link
Contributor Author

commented Mar 29, 2018

The same issue is reported at #4866

@AMBudnik AMBudnik closed this Mar 29, 2018

@wojciechczerniak wojciechczerniak removed this from the Backlog milestone Oct 18, 2018

@wojciechczerniak

This comment has been minimized.

Copy link
Member

commented May 15, 2019

Not exactly the same as #4866. We might have a fix without changing afterChange hook.

@AMBudnik

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2019

That would be cool

@wojciechczerniak wojciechczerniak modified the milestones: May 2019, June 2019 Jun 4, 2019

swistach added a commit that referenced this issue Jun 4, 2019

Changed: undoRedo does not track changes if a new value is the same a…
…s the old one. + additional time for walkontable.stretchH test spec for better stability. #4072

swistach added a commit that referenced this issue Jun 6, 2019

swistach added a commit that referenced this issue Jun 13, 2019

Added: test spec to prevent potential regression with track undo acti…
…on after change cell's value if its type is not string, number or boolean. #4072

swistach added a commit that referenced this issue Jul 8, 2019

UndoRedo should track changes only if a new value is different than t…
…he previous one (#6038)

* Changed: undoRedo does not track changes if a new value is the same as the old one. + additional time for walkontable.stretchH test spec for better stability. #4072

* Changed variable name and reverted sleepvalue in walkontable.stretchH's test spec. #4072

* Added: test spec to prevent potential regression with track undo action after change cell's value if its type is not string, number or boolean. #4072
@AMBudnik

This comment has been minimized.

Copy link
Contributor Author

commented Aug 12, 2019

Glad to see this issue gone. Thanks guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.