Closed jouni closed 8 years ago
iron-dropdown has similar issues, but it tries to prevent user scrolling outside the dropdown element at least. But when you scroll the dropdown itself, the whole page sometimes scrolls as well.
The first two bullet points in the list are closely related, and we should try to find a better solution to that than using a timer to reposition the viewport (by using event.preventDefault() for example). Timebox to 1 person day.
The third bullet point (about input refocusing) can be ignored at the moment, the current workaround in the fullscreen-ios branch is acceptable for 1.0.
One attempt to fix scrolling issues: https://github.com/vaadin/vaadin-combo-box/tree/feature/ios-fullscreen-part2
Basically this version prevents scrolling on other elements than the iron-list
(by using Polymer.IronDropdownScrollManager
) and at the same time limits the scroll position of the iron-list
to be within 0
– iron-list._maxScrollTop
by listening to touchmove
events and using preventDefault
when going outside the limits.
Using this approach has some drawbacks with the scrolling UX.
Another attempt: https://github.com/vaadin/vaadin-combo-box/tree/feature/ios-fullscreen-fixed
My approach:
#dropdown
style is { position: fixed }
again (back to the default){ position: fixed }
as welltouchmove
events and calls event.preventDefault()
when event.target
is either #dropdownContent
, paper-input-container
or a paper-input-container
descendant.Pros:
absolute
styles for #dropdown
iron-list
Cons:
@tuomasnironen should test each of the prototypes and provide feedback about them in order for us to make a decision on how to improve.
New direction for the UI decided that no longer contains a fullscreen feature. This will be evaluated separately.
See if there are ways to enhance the end user experience, compared to the feature/fullscreen-ios branch prototype, including: