Skip to content

Commit 2348d22

Browse files
committedNov 15, 2016
fix(picker): prevents scrolling under the picker
1 parent b77b2ae commit 2348d22

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/components/picker/picker-component.ts

+6
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ export class PickerColumnCmp {
9898
console.debug('picker, pointerStart', ev.type, this.startY);
9999
this._haptic.gestureSelectionStart();
100100

101+
// We have to prevent default in order to block scrolling under the picker
102+
// but we DO NOT have to stop propagation, since we still want
103+
// some "click" events to capture
104+
ev.preventDefault();
105+
101106
this.debouncer.debounce(() => {
102107
// cancel any previous raf's that haven't fired yet
103108
if (this.rafId) {
@@ -169,6 +174,7 @@ export class PickerColumnCmp {
169174
}
170175

171176
pointerEnd(ev: UIEvent) {
177+
ev.preventDefault();
172178
this.debouncer.cancel();
173179

174180
if (this.startY === null) {

0 commit comments

Comments
 (0)
Please sign in to comment.