Opened 8 years ago

Closed 7 years ago

#14096 closed defect (fixed)

ComboBox causes ScrollableView to scroll down

Reported by: Paul Christopher Owned by: Douglas Hays
Priority: high Milestone: 1.8
Component: DojoX Mobile Version: 1.7.0b1
Keywords: Cc: Douglas Hays, Atsushi Ono, ykami
Blocked By: Blocking:

Description

Description:

A combo box placed into a scrollable view causes - when opened - the view to scroll down. Moreover the selection list is misplaced. There is quite a huge distance between the text box and the selection list (see screenshot before.png and after.png).

Steps to reproduce:

Use the attached test case. Run it on Firefox7. Click into the text box so as to open the selection list of the combo box. This will cause the whole view to scroll down. The selection list is placed quite in some distance to the text box.

Dojo version: dojo-1.7.rc

Browser: Firefox7

Attachments (8)

index.html (6.1 KB) - added by Paul Christopher 8 years ago.
After.PNG (245.4 KB) - added by Paul Christopher 8 years ago.
Before.PNG (188.0 KB) - added by Paul Christopher 8 years ago.
index2.html (2.9 KB) - added by Paul Christopher 8 years ago.
after2.png (223.3 KB) - added by Paul Christopher 8 years ago.
before2.png (188.8 KB) - added by Paul Christopher 8 years ago.
14096.patch (3.0 KB) - added by Douglas Hays 8 years ago.
possible fix
14096_2.patch (9.9 KB) - added by Douglas Hays 8 years ago.
updated fix with performance fix while scrolling, requires #14124

Download all attachments as: .zip

Change History (16)

Changed 8 years ago by Paul Christopher

Attachment: index.html added

Changed 8 years ago by Paul Christopher

Attachment: After.PNG added

Changed 8 years ago by Paul Christopher

Attachment: Before.PNG added

comment:1 Changed 8 years ago by Paul Christopher

Added new test case (index2.html, before2.png, after2.png).

  • The view even scrolls down if there is no need for scrolling. This makes my iPad app behave quite awkward. Maybe this scrolling behaviour makes sense on low-res devices but not on an high-res devices like the iPad.
  • The select box is misplaced in this test case, too.
  • Scrolling the view does not close the drop down select box. Is this intended behaviour? Actionsheets are normally closed if the user clicks somewhere else on the screen.
  • Having closed the drop down box again, scrolling seems to be broken in some way: you cannot scroll back to the top. You need to scroll down to the very end of the page so as to be able to scroll back to the top again.

This all happens to me with dojo-1.7.rc1 and Firefox 7.0.1.

Changed 8 years ago by Paul Christopher

Attachment: index2.html added

Changed 8 years ago by Paul Christopher

Attachment: after2.png added

Changed 8 years ago by Paul Christopher

Attachment: before2.png added

comment:2 Changed 8 years ago by ykami

Cc: Douglas Hays added

I confirmed the problem.

Doug, do you know what scrolls the page when ComboBox gets focus?

comment:3 Changed 8 years ago by Douglas Hays

Milestone: 1.71.7.1
Owner: changed from ykami to Douglas Hays
Status: newassigned

Changed 8 years ago by Douglas Hays

Attachment: 14096.patch added

possible fix

comment:4 Changed 8 years ago by Douglas Hays

Fix needs review/testing

comment:5 Changed 8 years ago by ykami

Cc: Atsushi Ono ykami added

Doug, onoat has reviewed and tested the fix.
Onoat, could you explain the test result and your findings if any?

comment:6 Changed 8 years ago by Atsushi Ono

Doug, I have reviewed and tested the fix on iPhone and Android. It works quite better on both devices, and the code looks good to me.

One little concern is that ScrollableView's scrolling becomes choppy while ComboBox dropdown stays open because the dropdown position is adjusted every 50ms. I think it might be better to close ComboBox dropdown when starting to scroll the ScrollableView (on 'touchstart' event?), but I guess this is closely related to #14124. We'll work on #14124 to enable this.

Changed 8 years ago by Douglas Hays

Attachment: 14096_2.patch added

updated fix with performance fix while scrolling, requires #14124

comment:7 Changed 7 years ago by Douglas Hays

Milestone: 1.7.11.8

Fix needs more test time before being backported to 1.7 along with #14124.

comment:8 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [27307]:

Fixes #14096. Reposition ComboBox? popup on a timer to avoid asynchronous transform/position problems. Added a testcase with ComboBox? inside a ScrollableView?.

Note: See TracTickets for help on using tickets.