Opened 9 years ago
Closed 9 years ago
#14124 closed defect (fixed)
scrollable stops touchstart from bubbling
Reported by: | Douglas Hays | Owned by: | ykami |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | DojoX Mobile | Version: | 1.6.1 |
Keywords: | Cc: | Atsushi Ono | |
Blocked By: | Blocking: |
Description
Refer to #14096 testcase. When you click to open the ComboBox? popup and then click off the popup in the ScrollableView? area, the touchstart event is not fired to the ComboBox? event handler since scrollable::onTouchStart does event.stop. Note that touchmove and touchstop do not call event.stop and ComboBox? sees those. I think e.preventDefault() might be more correct to allow the event to bubble but not do any implicit action. If not, then I need to rework ComboBox? with this new assumption factored in.
Attachments (1)
Change History (12)
comment:1 Changed 9 years ago by
Cc: | Atsushi Ono added |
---|
Changed 9 years ago by
Attachment: | 14124.patch added |
---|
[patch][ccla] Reconsider touchstart event propagation in scrollable
comment:3 Changed 9 years ago by
Thanks for your suggestion, Doug. I have reconsidered scrollable::onTouchStart and attached a patch.
I confirmed that it is appropriate to use e.preventDefault() instead of event.stop except one case that SpinWheel (which is based on scrollable) is used inside ScrollableView, in which case we have to call event.stop to prevent ScrollableView from scrolling during scrolling SpinWheel. Therefore I added a new flag to specify whether to propagate touchstart event or not, which is set to true by default and set to false in SpinWheel case.
comment:4 Changed 9 years ago by
The patch looks OK. It's too bad that evt.stopPropagation() couldn't be called instead of having the widget attribute.
comment:6 Changed 9 years ago by
Milestone: | 1.7.1 → 1.8 |
---|
comment:7 Changed 9 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Starting with [27163] clicking a choice in the drop down in dojox/mobile/tests/test_ComboBox.html has no effect. (Before that, the clicked choice shows up in the input box.)
That test file also needs to be improved, it's not catching this error at all. Probably you should call on.emit() to simulate a click event.
comment:10 Changed 9 years ago by
comment:11 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
ok, thanks, I'm closing this ticket as (indirectly) fixed.
Thanks, you may be right.
Although we can not make this sort of change in 1.7.0, Onoat and I will be considering this.