Fabric.js is fine, the fault is mine