From fd21b3611f413b07e155a0ffd552f790c8be4163 Mon Sep 17 00:00:00 2001 From: rhenck <richard.henck@iqb.hu-berlin.de> Date: Fri, 23 Dec 2022 13:56:02 +0100 Subject: [PATCH] Raise width of the dragImage to take padding for the cursor into account --- .../common/components/input-elements/drop-list.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/common/components/input-elements/drop-list.component.ts b/projects/common/components/input-elements/drop-list.component.ts index 9a00a0902..9d48f1fc7 100644 --- a/projects/common/components/input-elements/drop-list.component.ts +++ b/projects/common/components/input-elements/drop-list.component.ts @@ -173,7 +173,7 @@ export class DropListComponent extends FormElementComponent implements OnInit, A const dragImage: HTMLElement = baseElement.cloneNode(true) as HTMLElement; dragImage.id = `${baseID}-dragimage`; dragImage.style.display = 'inline-block'; - dragImage.style.maxWidth = `${(baseElement as HTMLElement).offsetWidth}px`; + dragImage.style.maxWidth = `${(baseElement as HTMLElement).offsetWidth + 20}px`; dragImage.style.fontSize = `${this.elementModel.styling.fontSize}px`; dragImage.style.borderRadius = '5px'; dragImage.style.padding = '10px 20px'; // Leave space for cursor -- GitLab