Opened 10 years ago

Closed 10 years ago

#14532 closed defect (wontfix)

dojox mobile ScrollableView in a SwapView, events fires twice

Reported by: davliu Owned by: ykami
Priority: high Milestone: tbd
Component: DojoX Mobile Version: 1.7.0
Keywords: ScrollableView SwapView event Cc: Eric Durocher
Blocked By: Blocking:


This problem can only reproduce in Iphone and Ipad. I haven't test andriod or other touch device, but the desktop browsers don't have this problem.

If a ScrollableView? put in a SwapView?,and any emelent's event will fired twice, for example, a button in scrollableView, the onlick event will fired twice if i click the button.

To reproduce the issue,put test_iPhone-SwapView?.html to the dojox\mobile\tests, and run it, swap to the last view, and click the text, check iphone/ipad console.

Attachments (1)

test_iPhone-SwapView.html (4.8 KB) - added by davliu 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by davliu

Attachment: test_iPhone-SwapView.html added

comment:1 Changed 10 years ago by davliu

Correct my description:

Form Element do not have this problem, but if I connect the span, div with a onclick event, it will fired twice.

comment:2 Changed 10 years ago by ykami

Cc: Eric Durocher added
Resolution: wontfix
Status: newclosed

Apologies for this having been out of my radar for some reason. Your observation is right. One is from the SwapView, the other is from the ScrollableView. Events are generated programmatically by scrollable.js. There are no good ways to guarantee that only one event is fired even when scrollable views are nested. One possible workaround would be to override isFormElement() as follows, though it looks too hackish...

<div dojoType="">
    <div dojoType="" height="100%" isFormElement="return true;">
Note: See TracTickets for help on using tickets.