Subscribe on changes!

Breaks fabricjs selection control

avatar
Oct 13th 2020

Version

3.0.0

Reproduction link

https://jsfiddle.net/byd46gfp/1/

Steps to reproduce

  1. Click the blue rectangle to reveal the selection controls. Notice those controls can't be clicked
  2. Click button "Add" to add another rectangle; drag on canvas with mouse to form a region that contains both rectangles to select both rectangles; click empty space in canvas to deselect those rectangles; click any rectangle to select it. Notice the selection controls work this time, you can resize/rotate the rectangle with them.

What is expected?

Selection controls would always work, after step 1.

What is actually happening?

It doesn't work after step 1.


Note, it works with vue 2.x: https://jsfiddle.net/byd46gfp/2/

avatar
Oct 13th 2020

I found that using markRaw can make it work correctly:

    this.canvas = Vue.markRaw(new fabric.Canvas(c, {
      width: c.clientWidth,
      height: c.clientHeight
    }));
avatar
Oct 13th 2020

Thanks, it works with markRaw.