Issue #3295Opened March 1, 2021by marcepoblet0 reactions

BUG (v0.16.41): Button component with draggable property is not working properly

Question

Version: v0.16.41

Are you able to reproduce the bug from the demo?

[ ] Yes [ ] No

What is the expected behavior? When we have a button with the property data-gjs-draggable in false, this button not should be dragged in the canvas.

Describe the bug detailed Steps

  • Set a button component with draggable property in false
  • Drag the button inside other components
  • the button is dragged

What is the current behavior? Steps

  • Set a button component with draggable property in false
  • Drag the button inside other components
  • the button not should be dragged

Are you able to attach screenshots, screencasts or a live demo?

[ ] Yes (attached a video )

https://user-images.githubusercontent.com/64096863/109490335-da245880-7a66-11eb-8143-8ead257c9ba8.mp4

Answers (3)

artfMarch 4, 20210 reactions

I guess you're doing something wrong, how do you create those components and their properties?? You shouldn't even see those attributes in the inspector.

marcepobletMarch 4, 20210 reactions

@artf In our codes we have not changed anything. The only difference is that we update the GrapesJs version. Before I had version v0.16.18 and it worked correctly, but now we update GrapesJs to v0.16.41 and it doesn't work for buttons.

marcepobletMarch 4, 20210 reactions

we set the properties with this:

editor.getSelected().attributes.attributes["data-gjs-editable"] = 'false'
editor.getSelected().attributes.attributes["data-gjs-copyable"] = 'false'
editor.getSelected().attributes.attributes["data-gjs-droppable"] = 'false'
editor.getSelected().attributes.attributes["data-gjs-draggable"] = 'false'
editor.getSelected().attributes.attributes["data-gjs-resizable"] = 'false'
editor.getSelected().attributes.attributes["data-gjs-stylable"] = 'false'

this way was working perfectly for v0.16.18

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.