{"action":"created","issue":{"url":"https://api.github.com/repos/handsontable/handsontable/issues/2325","repository_url":"https://api.github.com/repos/handsontable/handsontable","labels_url":"https://api.github.com/repos/handsontable/handsontable/issues/2325/labels{/name}","comments_url":"https://api.github.com/repos/handsontable/handsontable/issues/2325/comments","events_url":"https://api.github.com/repos/handsontable/handsontable/issues/2325/events","html_url":"https://github.com/handsontable/handsontable/issues/2325","id":65435055,"number":2325,"title":"Cancelling remove row/column in before hook corrupts undo stack","user":{"login":"tmichel","id":220070,"avatar_url":"https://avatars.githubusercontent.com/u/220070?v=3","gravatar_id":"","url":"https://api.github.com/users/tmichel","html_url":"https://github.com/tmichel","followers_url":"https://api.github.com/users/tmichel/followers","following_url":"https://api.github.com/users/tmichel/following{/other_user}","gists_url":"https://api.github.com/users/tmichel/gists{/gist_id}","starred_url":"https://api.github.com/users/tmichel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmichel/subscriptions","organizations_url":"https://api.github.com/users/tmichel/orgs","repos_url":"https://api.github.com/users/tmichel/repos","events_url":"https://api.github.com/users/tmichel/events{/privacy}","received_events_url":"https://api.github.com/users/tmichel/received_events","type":"User","site_admin":false},"labels":[{"id":138470796,"url":"https://api.github.com/repos/handsontable/handsontable/labels/Plugin:%20undo-redo","name":"Plugin: undo-redo","color":"009800","default":false},{"id":41385924,"url":"https://api.github.com/repos/handsontable/handsontable/labels/Priority:%20normal","name":"Priority: normal","color":"fbca04","default":false},{"id":7906541,"url":"https://api.github.com/repos/handsontable/handsontable/labels/Type:%20Bug","name":"Type: Bug","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-03-31T12:00:50Z","updated_at":"2017-01-26T18:19:58Z","closed_at":null,"body":"When I try to remove a row or a column but this action is cancelled by returning false from `beforeRemoveRow` or `beforeRemoveCol` hooks, an undo action is still pushed to the undo/redo stack. This corrupts the stack and leads to duplicated row/column when calling undo.\n\nI created a [JSFiddle](http://jsfiddle.net/oanheya4/3/) to reproduce this.\n\nSomehow removing a column does not trigger the bug in the above linked example, but I can reliably reproduce it in my application. I'm using the version 0.13.1. Maybe it's been fixed on master?\n\nMy guess is that the undo hook runs before the user supplied hook and this causes that the remove action is placed on the undo stack.\n"},"comment":{"url":"https://api.github.com/repos/handsontable/handsontable/issues/comments/275467305","html_url":"https://github.com/handsontable/handsontable/issues/2325#issuecomment-275467305","issue_url":"https://api.github.com/repos/handsontable/handsontable/issues/2325","id":275467305,"user":{"login":"mikeb424","id":15384976,"avatar_url":"https://avatars.githubusercontent.com/u/15384976?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeb424","html_url":"https://github.com/mikeb424","followers_url":"https://api.github.com/users/mikeb424/followers","following_url":"https://api.github.com/users/mikeb424/following{/other_user}","gists_url":"https://api.github.com/users/mikeb424/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeb424/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeb424/subscriptions","organizations_url":"https://api.github.com/users/mikeb424/orgs","repos_url":"https://api.github.com/users/mikeb424/repos","events_url":"https://api.github.com/users/mikeb424/events{/privacy}","received_events_url":"https://api.github.com/users/mikeb424/received_events","type":"User","site_admin":false},"created_at":"2017-01-26T18:19:58Z","updated_at":"2017-01-26T18:19:58Z","body":"Similarly, it appears that returning false in beforeRemoveRow will still trigger a cellMetaReset, which is undesirable.  Also, there is no beforeCellMetaReset to quickly remedy this."}}
{"actor":{"display_login":"mikeb424"}}