Skip to content

Commit

Permalink
Merge pull request #2396 from kirbydesign/bug/2335-scrolling-swiping-…
Browse files Browse the repository at this point in the history
…in-dropdown-popout-list-on-native-devices-with-pull-to-refresh

Fix dropdown scroll problem on touch devices
  • Loading branch information
mictro authored Aug 4, 2022
2 parents 3d9a6b1 + 39d0bc2 commit 32c47d2
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class DropdownComponent implements AfterViewInit, OnDestroy, ControlValue
event.preventDefault();
}

/* Utility that makes it easier to set styles on card element
/* Utility that makes it easier to set styles on card element
when using popover*/
private setPopoverCardStyle(style: string, value: string) {
if (!this.usePopover) return;
Expand Down Expand Up @@ -463,6 +463,13 @@ export class DropdownComponent implements AfterViewInit, OnDestroy, ControlValue
}
}

@HostListener('touchstart', ['$event'])
_onTouchStart(event: TouchEvent) {
if (this.isOpen) {
event.stopPropagation();
}
}

@HostListener('focus')
_onFocus() {
if (this.disabled) {
Expand Down

0 comments on commit 32c47d2

Please sign in to comment.