Opened 8 years ago

Closed 8 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)

14124.patch (2.0 KB) - added by Atsushi Ono 8 years ago.
[patch][ccla] Reconsider touchstart event propagation in scrollable

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by ykami

Cc: Atsushi Ono added

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.

comment:2 Changed 8 years ago by Douglas Hays

Milestone: tbd1.7.1

The patch to #14096 prereqs this ticket.

Changed 8 years ago by Atsushi Ono

Attachment: 14124.patch added

[patch][ccla] Reconsider touchstart event propagation in scrollable

comment:3 Changed 8 years ago by Atsushi Ono

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 8 years ago by Douglas Hays

The patch looks OK. It's too bad that evt.stopPropagation() couldn't be called instead of having the widget attribute.

comment:5 Changed 8 years ago by ykami

Resolution: fixed
Status: newclosed

In [27163]:

Fixes #14124 !strict. Use e.preventDefault() instead of event.stop. Added a flag, propergatable, to control the behavior.

comment:6 Changed 8 years ago by ykami

Milestone: 1.7.11.8

comment:7 Changed 8 years ago by bill

Resolution: fixed
Status: closedreopened

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.

Last edited 8 years ago by bill (previous) (diff)

comment:8 Changed 8 years ago by ykami

Is it still reproducible?

comment:9 Changed 8 years ago by Douglas Hays

I didn't see any problems in Chrome nor iPad. bill?

comment:10 Changed 8 years ago by bill

The problems I saw are reproducible on FF against [27163], but they were fixed in [27681], by you.

comment:11 Changed 8 years ago by ykami

Resolution: fixed
Status: reopenedclosed

ok, thanks, I'm closing this ticket as (indirectly) fixed.

Note: See TracTickets for help on using tickets.