ibm-js / delite

HTML Custom Element / Widget infrastructure
http://ibm-js.github.io/delite/
Other
68 stars 28 forks source link

HasDropDown: scrolling should not open drop down #380

Closed wkeese closed 7 years ago

wkeese commented 9 years ago

On mobile devices, if the user is just trying to scroll the page. but happens to touch the HasDropDown widget, the dropdown will open.

This behavior is essentially by design, to allow the slide-select gesture (see https://github.com/ibm-js/delite/blob/master/tests/functional/HasDropDown.js#L104), although I can see how it may be overall bad on mobile.

On desktop, the native behavior for a <select> is to open the dropdown on mousedown. On mobile (at least on an iPad), the native behavior is to open the dropdown on click.

On one hand, this slide-select feature can actually be useful, even on mobile, especially if the page doesn't scroll. OTOH, on mobile, it could lead to unexpected behavior. Plus which, often on phones dropDownPosition==center and the slide-select gesture doesn't really make sense.

(split from #379)