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

Objects added via group don't fire 'added' #7037

Closed
VanillinT opened this issue Apr 23, 2021 · 4 comments
Closed

Objects added via group don't fire 'added' #7037

VanillinT opened this issue Apr 23, 2021 · 4 comments
Labels

Comments

@VanillinT
Copy link

Version

4.4.0

Test Case

https://jsfiddle.net/67y5jco8/1/

Information about environment

Chrome 89.0.4389.128

Steps to reproduce

Call addWithUpdate on a group with any fabric object as a parameter

Expected Behavior

Objects fire 'added' when added to a group

Actual Behavior

They don't fire 'added' when added to a group

@asturur
Copy link
Member

asturur commented May 4, 2021

We had a PR for this somewhere to fix it.

@asturur asturur added the bug label May 4, 2021
@ShaMan123
Copy link
Contributor

+1

@ShaMan123
Copy link
Contributor

If I am not mistaken this happens because group doesn't call Collection#add and instead pushes the object to _objects:
https://github.com/fabricjs/fabric.js/blob/master/src/shapes/group.class.js#L167

@ShaMan123
Copy link
Contributor

ShaMan123 commented Aug 14, 2021

duplicate #6619

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

No branches or pull requests

3 participants