fix(picker): prevents scrolling under the picker

This commit is contained in:
Manu Mtz.-Almeida
2016-11-15 12:14:57 +01:00
parent b77b2ae440
commit 2348d228fa

View File

@ -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) {
@ -169,6 +174,7 @@ export class PickerColumnCmp {
}
pointerEnd(ev: UIEvent) {
ev.preventDefault();
this.debouncer.cancel();
if (this.startY === null) {