Issue Task Closed

#101085Problems with Drag & Drop in Page layout

Reto Gehrig 06/15/23, 08:18 updated 07/19/24, 13:31

Description

I’m using the «container» extension and have noticed that when drag & drop content elements within the container, the content to be moved is stuck under the cursor by twice the distance. This can be irritating for the user. I identified the reason in the style class .t3-page-ce. Nesting this class moves the starting point for positioning the element.

.t3-page-ce {
  display:block;
  position: relative; /* -> remove to fix the problem */
  margin:var(--pagemodule-grid-spacing) var(--pagemodule-grid-inner-spacing);
  transition:height .4s ease-out;
  overflow:hidden;
}

If the positioning is not urgently needed, I would remove it.

In addition, I noticed that after moving the element, the styles “width, left, top” are set to “unset” in drag-drop.js. This in turn can lead to unwanted display. To counteract this, the following correction would make sense.

  /* Line 165 - 167 */
  e.target.style.width = '';
  e.target.style.left = '';
  e.target.style.top = '';

I hope these suggestions will help someone else.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.