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

Async validation throws exception #5567

Closed
budnix opened this Issue Nov 6, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@budnix
Copy link
Member

budnix commented Nov 6, 2018

Description

When the Handsontable is configured to use asynchronous validators, destroying the handsontable instance before the validators finished validating the cell value causes throwing TypeError.

Steps to reproduce

  1. Go to https://jsfiddle.net/c102ou9v/1/
  2. Type test to cell A1 and close an editor (it won't close because of async validator)
  3. Wait ~10 seconds after the Handsontable instance will be destroyed. 1 second later the validator call callback on the destroyed instance which throws an error.

Demo

https://jsfiddle.net/c102ou9v/1/

Your environment

  • Handsontable version: 6.1.1
  • Browser Name and version: any
  • Operating System: any

@swistach swistach self-assigned this Jan 3, 2019

@swistach swistach added this to the January 2019 milestone Jan 3, 2019

swistach added a commit that referenced this issue Jan 3, 2019

swistach added a commit that referenced this issue Jan 3, 2019

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

swistach added a commit that referenced this issue Jan 9, 2019

Async validation should not throw an exception. (#5702)
* Validator should not throw an exception if the instance was destroyed in the meantime. #5567

* Removed console.log

* Added: test spec to prevent regression. #5567

* Changes after CR. #5567

@AMBudnik AMBudnik closed this Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.