Fabric.js: fabric.Itext dont fire canvas "object:modified" event

Created on 25 Mar 2014  路  12Comments  路  Source: fabricjs/fabric.js

After "editing:exited" event i expect to get canvas "object:modified", if i changed something in the text

possible_feature

All 12 comments

We have "text:selection:changed" and "text:changed" events. Are those not enough?

@kangax I don't think they are enough because

  1. You expect to get the object:modified event when the text has been edited but this event is not fired
  2. Combining these events is not nice to do (i.e. you have to duplicate some code since you cannot do something like object:modified, text:changed)

Fair enough, I reopened it for now.

closed with 1.6.2 release

What event is available to check if the text has been changed?

awesome...it works like a charm

@abhi06991 ,still not working for me ,i'm using version:1.63

canvas.on({ 'object:modified':deal_function, 'text:changed':deal_function });
can you give some jsfiddle? thanks.

canvas.on( 'object:modified', deal_function);

canvas.on('text:changed', deal_function);

not sure about the way you wrote it

@asturur ,thanks for your reply,here it is: [https://jsfiddle.net/1fybz0h2/1/]
you can see that: when you edit the text ; the text:changed will be fired but "bold button click" not.
whether i have to manually use "canvas.trigger()" in this way?

fabricjs is not gonna trigger everything for you. if you have a button than execute some code and change some property, fire object modified by yourself.

ok,thx.

Was this page helpful?
0 / 5 - 0 ratings