Skip to content

Commit

Permalink
fix(picker): prevents scrolling under the picker
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Nov 15, 2016
1 parent b77b2ae commit 2348d22
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/picker/picker-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ export class PickerColumnCmp {
console.debug('picker, pointerStart', ev.type, this.startY);
this._haptic.gestureSelectionStart();

// We have to prevent default in order to block scrolling under the picker
// but we DO NOT have to stop propagation, since we still want
// some "click" events to capture
ev.preventDefault();

this.debouncer.debounce(() => {
// cancel any previous raf's that haven't fired yet
if (this.rafId) {
Expand Down Expand Up @@ -169,6 +174,7 @@ export class PickerColumnCmp {
}

pointerEnd(ev: UIEvent) {
ev.preventDefault();
this.debouncer.cancel();

if (this.startY === null) {
Expand Down

0 comments on commit 2348d22

Please sign in to comment.