GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.37k stars 4.05k forks source link

BUG: configuring an onStart() resize callback prevents resizing #5630

Closed kla-ko closed 8 months ago

kla-ko commented 8 months ago

GrapesJS version

What browser are you using?

Chrome Version 120.0.6099.225

Reproducible demo link

https://jsfiddle.net/wattnu/y8L6whun/

Describe the bug

How to reproduce the bug?

  1. Goto jsfiddle
  2. run the code
  3. on the canvas, select the blue div component
  4. try to drag the resizer handle located at bottom center
  5. the resize handle doesn't move with your mouse
  6. In the js code, check my plugin implementation on the top. There, consider the part:
    resizable: {
            tl: 0, tc: 0, tr: 0, cl: 0, cr: 0, bl: 0, bc: 1, br: 0, 
            onStart: (event, opt) => { console.log('resize started') } ,
          },
  7. comment out the onStart config --> // onStart: (event, opt) => { console.log('resize started') } ,
  8. re-run the fiddle. Now it is possible to resize the blue block.

What is the expected behavior? The component should be resizable even when configuring an onStart calback

What is the current behavior? The component cannot be resized if an onStart callback is configured. The callback is executed though.

Code of Conduct

artf commented 8 months ago

Good catch, will fix it