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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
event handler 1 registered for 'object:modified' (could be any event, but the error happens as long as I'm working with handlers for the same event)
event handler 2 registered for 'object:modified'
event handler 1 unregisters event handler 2 when executing
When the event is triggered, handler 1 runs and removes handler 2. But fabric still wants to execute handler 2 but it has already been unregistered. The following error is printed to the console: fabric.js:166 Uncaught TypeError: Cannot read property 'call' of undefined.
The error is not always a problem (in that it breaks the application), but it often does not finish the current action (e.g. resizing an object). I think it should be possible to remove handlers for an event, while that event is being handled.
The text was updated successfully, but these errors were encountered:
i wenr back on this issue. Regestiring the events in the correct order does not cause any problem. http://jsfiddle.net/qny6q64w/3/
Do not really know if this is a bug or a misuse.
I have a canvas with the following setup:
When the event is triggered, handler 1 runs and removes handler 2. But fabric still wants to execute handler 2 but it has already been unregistered. The following error is printed to the console:
fabric.js:166 Uncaught TypeError: Cannot read property 'call' of undefined
.JS Fiddle
The error is not always a problem (in that it breaks the application), but it often does not finish the current action (e.g. resizing an object). I think it should be possible to remove handlers for an event, while that event is being handled.
The text was updated successfully, but these errors were encountered: