Closed throne1986 closed 2 years ago
@artf I have tested with old versions below 22 everything is fine , but from version 25, 26, 27, 28, 29 there is this bug when u drag and drop a custom plugins which cotains an image , if you remove the image the error is gone ,
Please check this, thanks a lot brother
I ran into this problem, too. It seemed to happen whenever I started dragging a block's media icon instead of the block text or block container. It seems that the issue was resolved by adding pointer-events: none;
to each of my block's media image styles.
The image I'm talking about being dragged:
In my case:
editor.BlockManager.add('lx-button', {
label: 'LiveX Button',
media: `<img style="width: 32px; height: 32px; filter: invert(0.75); pointer-events: none;" src='https://www.svgrepo.com/show/368574/button.svg' />`,
category: 'LiveX',
content: `
<div class='lx-button normal'>View Details</div>
`,
})
pointer-events: none;
Agreed that resolve the issue @artf is this the right aproach to this bug ?
Hi guys, I am also having the same issue. Please share the solution for it . Thanks
Hi guys, I am also having the same issue. Please share the solution for it . Thanks
Hii, I added pointer-events: none
to my custom plugins to solve the issue but is this theright aproach? am not sure only @artf can confirm this
pointer-events: none;
is not working for me, I literally have to restart the whole browser in order to make it working normally again.
Yeah I'll actually fix that in the next release with the same approach https://github.com/artf/grapesjs/commit/828e64b235b835ce5a42d50ee8565e9f4da7839a
pointer-events: none;
is not working for me, I literally have to restart the whole browser in order to make it working normally again.
@markovic-nikola This Is REALLY IMPORTANT. SUPER THANKS. :D
I have the same problem https://prnt.sc/25uumtx
I have the same problem https://prnt.sc/25uumtx
In my case, reinstall grapesjs to 0.17.29 And, referenced This comment
A rare use-case I know, but the pointer-events fix will not stop the bug if a user drags an image from their OS into the canvas.
I've just had to downgrade for now but this shouldn't be closed
@skru there were actually more than one problem in this bug and the one you're mentioning was actually fixed here
@artf I am still facing this issue. Getting same error whenever I tried to drag and drop image from my pc to canvas. Is there any temporary fix for this yet?
@omergr8 I see no issues on the official demo, so if you believe the problem is still there, please open a new issue with a reproducible demo.
@artf I am still facing this issue. Getting same error whenever I tried to drag and drop image from my pc to canvas. Is there any temporary fix for this yet?
@omergr8 I think it's the same situation I've been through
literally have to restart the whole browser
What I wanted to emphasize is this. Even if you change the version, didn't solve it.
In my case, It was an ignorant way I restarted chrome every time I lowered the dependencies one by one. and i find working version. ( in current version of greapesjs. there is no need to consider )
so, I think this issue is related to not only CSS, but also browser functionality. the point here is, I restart whole chome process including the Chrome App.
literally whole browser. as @markovic-nikola said
how about try to install grapesjs
latest version( now 0.18.2 ), clear page cache and restart chrome process?
If the error is the same, I think you need a different approach. :thinking:
@luasenvy this is why I always ask for a reproducible demo because people do not realize they're running behind a cached file
GrapesJS version
What browser are you using?
Chrome v96.0.4664.45
Reproducible demo link
https://codesandbox.io/s/react-redux-toolkit-application-forked-l5rhp?file=/src/pages/Editor.js
Describe the bug
How to reproduce the bug?
What is the expected behavior? Drag and drop the logo to canvas
What is the current behavior? I have created a simple custom plugin just a logo , now when I drag and drop to canvas I get the following error Cannot read properties of undefined (reading 'uploadFile')
If is necessary to execute some code in order to reproduce the bug, paste it here below:
@artf What am I doing wrong here?
Code of Conduct