fix(consentsoftware-toggle): Fix issue in drag event handling logic for the toggle component.
This commit is contained in:
@ -189,7 +189,6 @@ export class ConsentsoftwareToggle extends LitElement {
|
||||
|
||||
// Start dragging
|
||||
this.isDragging = true;
|
||||
this.hasDragged = false;
|
||||
// The difference between the pointer’s X and the knob’s current position
|
||||
this.startX = event.clientX - this.currentX;
|
||||
|
||||
@ -229,6 +228,9 @@ export class ConsentsoftwareToggle extends LitElement {
|
||||
|
||||
// Dispatch toggle event
|
||||
this.dispatchEvent(new CustomEvent('toggle', { detail: { selected: this.selected } }));
|
||||
delayFor(0).then(() => {
|
||||
this.hasDragged = false;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user