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

this.canvas is undefined error thrown when removing IText inside mouse:down event #4640

Closed
rkrueger11 opened this issue Jan 22, 2018 · 4 comments · Fixed by #4650
Closed

Comments

@rkrueger11
Copy link

Version

at least 1.7.7 -> 2.0.0-rc4

Test Case

https://jsfiddle.net/rkrueger11/yghu8dbq/

Steps to reproduce

  1. Open the browser js console.
  2. Click on the rectangle to remove.
  • Notice no error is thrown.
  1. Click on the text to remove.
  • Note the error thrown.
  1. Click anywhere else on the canvas.
  • Note the second error thrown.

Expected Behavior

No errors should be thrown.

Actual Behavior

Two this.canvas is undefined errors are thrown which prohibit further execution of code in the stack.

@asturur asturur added the bug label Jan 26, 2018
@asturur
Copy link
Member

asturur commented Jan 26, 2018

thanks for the clear fiddle.
I'll post a fix today or tomorrow if i found the bug and release the version
It will be fixed on 2.x only probably

@asturur
Copy link
Member

asturur commented Jan 28, 2018

The default event handler for mouse down gets excuted after the generic canvas mousedown.
Removing the object from the canvas makes the mousedown event handler fail.
i safeguarded it with a check that the object is on a canvas before executing.

@rkrueger11
Copy link
Author

No problem. Hm.. it seems that fiddle continues to fail on v2.0.2. Do I need to override that handler now?

@asturur
Copy link
Member

asturur commented Feb 19, 2018

what a shame.... is failing somewhere else later in the chain.
:(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants