[BUG]: Can't drag component if there is some space on top/left with Mode Absolute
Question
Given the following code example...
<div style="height: 100px;">
Some Space on top or left
</div>
<div id="gjs">
<p style="padding: 25px">
Hesdllo World!!!</p>
</div>
editor.getModel().set('dmode', 'absolute');
Results in no ability to drag and drop elements to correct position using drag icon on the panel.

See Fiddle for demonstration...
Answers (3)
this is only for the drag icon, right? the manual dragging is fine. using the drag icon, it resets the position of the element from the top as it seems.
this is only for the drag icon, right? the manual dragging is fine. using the drag icon, it resets the position of the element from the top as it seems.
Yes this is only for drag icon.
Yeah the problem here is the different Event object based on the context. When you trigger the drag on the component itself the Event is in the context of the iframe (because the clicked element is in iframe) but component's buttons are outside of the iframe so the context if the Event is the original window.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1577
Inline CSS Comments break Code Manager
Apparently this is valid piece of html and css: <div style="color: red; / height 200px; /; font-weight: bold;"> (Hence the commented out he...
Issue #1703
[Question] How to allow special characters in class name or data attribute?
In my HTML code, I have some variable placeholders defined in element's class name or data attributes. For example, consider following code...
Issue #1567
rte toolbar bug
Hello all, I am using the latest grapesjs stable version (40) and I noticed the following bug in the rich text editor: If the user drags an...
Issue #1526
[QUESTION] how to make fullscreen command
Hi, unfortunately I do not find documentation and can't manage to get it understand from code: I know there is a built-in command 'fullscre...
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.