Opened 10 years ago

Closed 10 years ago

#14488 closed defect (patchwelcome)

Choppy scrolling of expanded combo box in scrollable view on desktop browsers

Reported by: Paul Christopher Owned by: Douglas Hays
Priority: high Milestone: tbd
Component: DojoX Mobile Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:



Scrolling a view with an expanded combo box is very choppy on desktop browsers.

Steps to reproduce the issue:

Open dojox/mobile/tests/test_FormControls.html with a desktop browser such as Firefox. Click into the combo box so as to open the popup / selection list. Now scroll the whole scrollable view down using the mouse. Do it quite fast. As long as you hold down the left mouse button, the popup seems not to be realigned immediately. If you release the mouse button the update rate of realigning the box seems to be much higher. It gets nicely repositioned.


It is not clear to me why the combo box needs to get repositioned by javascript. Why is the input field on instatiation as a dojox mobile combo box widget not wrapped by a div and the popover positioned by css relative to this parent?

Attachments (1)

screenshot.png (154.6 KB) - added by Paul Christopher 10 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by ykami

Owner: changed from ykami to Douglas Hays is marked as experimental. I'm not sure if it is really practical to use, especially in the situations where virtual keyboard pops up. We may have to reconsider its UI design.

comment:2 Changed 10 years ago by Douglas Hays

The widgets are not templated so we don't substitute any HTML in place of the user's INPUT box for page load speed purposes. If we goo ahead and add a DIV anyway, then when the INPUT style (position/top/left/float/display/et al) is changed dynamically, then the DIV would not properly reflect what is happening. Also, because scrolling is happening asynchronously and semi-slowly for visual appeal (mostly on a mobile device and this is a mobile widget), then the repositioning has to happen long after the touchend event. When the keyboard can popup and down and cause a hidden scroll (and there's no event for this), then that adds further complication. As long as you are scrolling the view then I don't bother to reposition the popup to provide smooth scrolling for the view. I don't see any better solution.
As far as the original problem, can you explain exactly how and what you are scolling with Firefox? Using Firefox and the mouse, I can scroll the document with the scrollbar and don't see the combobox popup repositioning. I can scroll the combobox popup contents with the mouse and again I don't see if repositioning. I only see that on a mobile device with touch events.

comment:3 in reply to:  2 Changed 10 years ago by Paul Christopher

Replying to doughays:

Sorry, I have just seen that there is a bug in my bug report: You need to open dojox/mobile/tests/test_ComboBox-ScrollableView.html and not dojox/mobile/tests/test_FormControls.html. Open test_ComboBox-ScrollableView.html click into the input field so as to open the popup and scroll down the whole scrollable view using your mouse. Do it quite fast. As long as you hold down the left mouse button (so as to scroll the whole scrollable view), the popup seems not to be realigned immediately. Have a look at the screenshot attached which was taken during scrolling. You can see that the combo box is not on the screen anymore, but the popup is stil in its old place. The update rate of repositioning the combo box seems to be very slow. However if you release the left mouse button, the update rate of repositioning the pop up seems to be much higher.

But all in all I do agree: The main goal is to make it work on mobile devices and not on desktop browsers.

Changed 10 years ago by Paul Christopher

Attachment: screenshot.png added

comment:4 Changed 10 years ago by Paul Christopher

Unfortunately testing form elements - especially on a ScrollableView - cannot be tested anymore, since all test cases for form elements in ScrollableViews have been removed. Especially ComboBox is prone to a some problems there. I think it is crucial to test form elements not on "static views" only but on scrollable views, too (so as to asure readyness for production).

comment:5 Changed 10 years ago by ykami

In [28043]:

Refs #14488 Restored test_ComboBox-ScrollableView?.html. Sorry, I removed it by mistake.

comment:6 Changed 10 years ago by ykami

In [28046]:

Refs #14488 Renamed test_ComboBox-ScrollableView?.html to test_ComboBox-sv.html to be consistent with others.

comment:7 Changed 10 years ago by Douglas Hays

Resolution: patchwelcome
Status: newclosed

This is working as designed. The popup is repositioned when the scrolling as quiesced for performance reasons. Patches are always welcome, but surrounding user elements with parent DIVs can cause unintended side-effects when custom and programmatical styling/positioning is being used.

Note: See TracTickets for help on using tickets.