survey-creator icon indicating copy to clipboard operation
survey-creator copied to clipboard

[V2] Add dragged element as child of survey creator root

Open SamMousa opened this issue 2 years ago • 12 comments

Are you requesting a feature, reporting a bug or ask a question?

Bug / feature

What is the current behavior?

Dragging an element causes the dragged element to be appended to the end of the body.

What is the expected behavior?

Ideally all DOM elements should be children of the survey creator root element. We embed inside a page that has a different setting for border-box for example. We can fix this in the survey-creator root element with some CSS, but then we have to apply extra fixes for those elements that are dynamically generated.

Since the element is attached to the cursor it is already absolutely positioned so there is no requirement for having it outside the survey creator's root element.

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://surveyjs.io/create-survey-v2

SamMousa avatar Nov 23 '21 10:11 SamMousa