Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to move cell from row #2478

Closed
obrazkow opened this issue Dec 29, 2019 · 5 comments
Closed

Error when trying to move cell from row #2478

obrazkow opened this issue Dec 29, 2019 · 5 comments
Labels

Comments

@obrazkow
Copy link

obrazkow commented Dec 29, 2019

If try move cell from table on body then appears error

image

Also error appears on grapesjs demo https://grapesjs.com/demo-newsletter-editor.html

@obrazkow
Copy link
Author

Problem in Sorter.
function dimsFromTarget return empty array, when target element not in draggable list
see
https://github.com/artf/grapesjs/blob/dev/src/utils/Sorter.js#L644(not found target)
https://github.com/artf/grapesjs/blob/dev/src/utils/Sorter.js#L648(return empty array)

And after this function call getTargetModel with target undefined and appears error
see https://github.com/artf/grapesjs/blob/dev/src/utils/Sorter.js#L449

Maybe need add check on exists target? Can you fix this error or i need to do pull request?

@artf
Copy link
Member

artf commented Jan 2, 2020

Can you tell me exactly how to reproduce the error because I don't see any error by dragging off the cell

@obrazkow
Copy link
Author

obrazkow commented Jan 2, 2020

First error.

  1. Select cell wrapper(see on screenshot) and try drag it
  2. In console will appear errors
    image

For more details i attach link on two video files. When i tried to reproduce, i found another bug. Try select first component for example text and move it and after select cell and try drag it. You'll see that line of destination will be in wrong position

https://dropmefiles.com/wJvVt

@artf
Copy link
Member

artf commented Jan 4, 2020

Maybe need add check on exists target? Can you fix this error or i need to do pull request?

Yeah, it actually doesn't even make sense to continue onMove without the target, I'll take care of it, thanks for the insight

@artf artf added the bug label Jan 4, 2020
@artf artf closed this as completed in ea19ee4 Jan 5, 2020
@obrazkow
Copy link
Author

obrazkow commented Jan 8, 2020

But is not fixed.
Repeat steps and you will get error Uncaught TypeError: Cannot read property 'indexEl' of undefined.
It can be to reproduce in your demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants