Closed AdrianVasiliu closed 9 years ago
Good point.
It seems native browser behavior is inconsistent on desktop and mobile. On desktop, elements get focus on mousedown, but on mobile, they get focus on touchend (assuming there was no touchmove). I designed KeyNav to match desktop, but maybe I need to rethink that.
I designed KeyNav to match desktop, but maybe I need to rethink that.
Okay, thanks for looking into it. Just to clarify (although you may have guessed), I raised the issue because it hurts Combobox (via List).
Great, thanks @wkeese. At a quick testing on various browsers, Combobox goes well after this fix.
BTW, the same issue exists for HasDropDown (where it seems a bit trickier because it listens also to pointerenter and pointerleave, in addition to pointerdown, for the sake of its hovering
property (apparently undocumented) - but maybe this can go away entirely; you know better).
@AdrianVasiliu - Are you saying that the problem is that the dropdown will open when the user touches the HasDropDown widget, but the user was just trying to scroll the page?
Yes, that's what I'm saying (after testing it).
Hmm, OK. This behavior is also by design (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. I filed #380 for it.
When a widget extending delite/KeyNav contains a descendant with native scrolling (
overflow: scroll
style), I would think it is unexpected (and wrong) that KeyNav triggers navigation (including emittingkeynav-child-navigated
events) while the user scrolls on touch devices. The navigation is triggered by the "pointerdown" handler (https://github.com/ibm-js/delite/blob/0.6.0/KeyNav.js#L158-163).How to reproduce: