If the HTML5 canvas layer disappears on mouse click in Fabric.js and Firefox stops responding when creating the canvas to the image, you can drag and drop images from your computer via Fabric to the canvas.
You can achieve this by setting the draggable attribute of the image to true −
<img draggable = "true" alt="In Fabric.js, when creating a canvas for an image, the HTML5 canvas layer disappears on mouse click and Firefox stops responding" >
The above is the detailed content of In Fabric.js, when creating a canvas for an image, the HTML5 canvas layer disappears on mouse click and Firefox stops responding. For more information, please follow other related articles on the PHP Chinese website!