canvas画板的光标问题 要怎么解决

使用canvas 的用到了fabric的库 大致功能做的都差不多了 才发现了一个bug 使用

但是输入完成后 点击其他的工具的话 是不会取消这个光标的 会一直停留在画板上应该怎么解决

img


case "text": //文本框
          this.textbox = new fabric.Textbox("", {
            left: mouseFrom.x,
            top: mouseFrom.y - 10,
            fontSize: 16,
            borderColor: this.color,
            fill: this.color,
            hasControls: false    
          });
          this.canvas.add(this.textbox);
          this.textbox.enterEditing();
          this.textbox.hiddenTextarea.focus();
          break;