BUG: Move component from Child
Question
Hi,
i'm trying to make custom components composed with other components. No problem to do that. I'm facing an issue when i want to move the whole component.
Here is my test component:
editor.DomComponents.addType('testcomponent', {
// Model definition
isComponent: el => {
if (el.tagName === 'DIV' && (typeof el.dataset.type !== 'undefined' && el.dataset.type== 'testcomponent')) {
return { type: 'testcomponent'};
}
},
model: {
// Default properties
defaults: {
tagName: 'div',
attributes: {"data-type": "testcomponent"},
components: [
{
resizable: false,
draggable: false,
droppable: false,
selectable: false,
hoverable: false,
propagate: ['hoverable', 'draggable', 'resizable', 'droppable', 'selectable'],
type: 'link',
components: 'My link'
}
]
}
}
});
it looks like this on the editor :

my issue is when i want to move the component, i can move it when i click on the blank space after the a href link, but when i want to move it by click/dragging on the link, nothing happen...
I know i put the non selectable parameter on the link component, but is it possible to move it anyway ?
For the record, i can move the whole thing by using the handle "tlb-move"
Thanks !
regards
Answers (3)
Thank you ;)
No, it's all as defined. You're trying to drag a non-draggable component so, the behavior is correct
Hi,
thank you for the answer. Well, i know my "link" component is not draggable, i set it that way (to specially not drag the link outside the whole component) But it's also set as non selectable, so if i click on it, and i want to drag the whole thing, we should expect to select the whole component right ?
If not, is there a solution to do so ?
regards
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2549
[QUESTION] Update component view on property change
Hi everyone, I'm trying to create a component that will update it's view based on a property value My approach is bassed on #1227 and on th...
Issue #2697
[QUESTION] Problem with custom component type and table cell
Hello! I'm trying to add custom component type: And also I'm adding new block: But when I drop this block on the canvas the <td> tag doesn'...
Issue #2614
[QUESTION] Recursive view update of custom component
Hi, I have defined a custom type like: I want to keep the customTag in my model and show the content (HTML) in the view. However, in the co...
Issue #2329
[HELP] Canvas clears component rendering after Traits value change event
I have created custom components and blocks, but when value of traits change, the rendered element gets invisible from the canvas until it...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.