Dragging A Nested Element Out of A Instance By Accident

Hello: I often move nested elements around a component instance and I guess this one time, I accidentally moved the element outside the instance container, and because you can’t delete nested elements in an instance, the element remained part of the instance and Penpot just rendered it outside the instance where it was dragged to. Furthermore, Penpot renders just the outline of the element when moved outside its container (see below), and when you click anywhere else in the viewport, the element disappears, BUT when looking at the instance in the Layers tab, the element is NOT marked as hidden.
ie-

Is this a bug or by design? If its by design, it became an issue with me when it happened in a board with a lot of nested elements where a particular element went missing but was NOT marked hidden. I thought it was hiding behind a sibling element when it was actually accidentally dragged outside its container. Is it possible to prevent nested elements to be dragged outside an instance or just mark it as hidden in this situation, preferably in the same position it was in before it was dragged out of the container?

/joselito

Sorry, but this is the normal working. Boards have a setting “Clip content”, that controls whether the content outside the board are visible or not. If you move an element completely outside the board, it will be clipped even if it’s not marked as hidden.

image

2 Likes

Thanks again, @hirunatan. I wasnt aware of the ‘Clip Content’ setting and by disabling it, the element reappeared in the viewport where it was moved to.

1 Like