Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix: un-highlight slots accordingly during drag & drop
Browse files Browse the repository at this point in the history
  • Loading branch information
faselbaum authored and marionebl committed Sep 17, 2018
1 parent 9612f21 commit ffef2b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/container/element-list/element-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@ export class ElementList extends React.Component {
const target = e.target as HTMLElement;
const isSibling = target.getAttribute(Components.ElementAnchors.placeholder) === 'true';
const targetElement = utils.elementFromTarget(e.target, { sibling: false, store });
const targetContent = utils.elementContentFromTarget(e.target, { store });

if (!targetElement) {
return;
}

targetElement.setHighlighted(false);
const content = targetElement.getContentBySlotType(Types.SlotType.Children);

if (content) {
content.setHighlighted(false);
if (targetContent) {
targetContent.setHighlighted(false);
}

if (isSibling) {
Expand Down

0 comments on commit ffef2b3

Please sign in to comment.