Opened 9 years ago
Closed 9 years ago
#15623 closed defect (fixed)
dojox.mobile.IconContainer: misbehavior in editing mode with scrollable view
Reported by: | Adrian Vasiliu | Owned by: | Eric Durocher |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | DojoX Mobile | Version: | 1.8.0b1 |
Keywords: | Cc: | cjolif | |
Blocked By: | Blocking: |
Description (last modified by )
When IconContainer is contained in a dojox.mobile.ScrollableView, the editing operation misbehaves as soon as the view is scrolled.
How to reproduce:
- Launch dojox/mobile/tests/test_IconContainer-pubsub.html
Dojo 1.8b1
(reproduced on iPhone 4S iOS 5.0.1 and Chrome 19).
- Press the "Start Edit" button (or do a long touch on an icon).
- As long as the view is not scrolled, the behavior is the expected one: when touching an icon, it zooms a bit while staying at the same location. So far so good.
- Now scroll the view (on desktop, you need to reduce the size of the window for this purpose), and try again to touch an icon.
==> KO. Now the icon "jumps" to a different location, possibly outside of the visible area. The distance from the expected position is equal to the amount of scroll. This makes the editing operation hard or impossible to use for scrolled views.
Attachments (2)
Change History (13)
comment:2 Changed 9 years ago by
Adrian, are you sure about:
if(scroll){ // this node is placed inside a scrollable var pos = enclosingScrollable.getPos(); dx = pos.x; dy = pos.y; }
It does not look like scrollable is defined?
Changed 9 years ago by
Attachment: | patch15623.patch added |
---|
Fix misbehavior in editing mode inside ScrollableView - Adrian Vasiliu, IBM, CCLA
comment:4 Changed 9 years ago by
Description: | modified (diff) |
---|---|
Version: | 1.7.3 → 1.8.0b1 |
comment:5 Changed 9 years ago by
Another problem with editing IconContainer icons in ScrollableView is that when you will drag around your icon the view will scroll. Which is quite annoying. Even if the typical pattern is probably to organize superfluous icons in various swap views than in a single scrolled view it would be nice to have it working. Also it seems that I can't drag the icons in Android 2.2 (at least).
comment:6 Changed 9 years ago by
Status: | new → open |
---|
Changed 9 years ago by
Attachment: | patch15623_2.patch added |
---|
New patch that fixes the double scrolling problem - Eric Durocher (IBM, CCLA)
comment:7 Changed 9 years ago by
This second patch should fix the 'double scrolling' problem reported by cjolif. I added an event.stop(e) call to stop propagation to the ScrollableView, and also replaced the use of touch.move by the native "touchmove" (or "mousemove"), the reason is that touch.move is actually a synthetic event that is listened to on the document (see dojo/touch.js), so there is no way to stop it from bubbling to the ScrollableView (since the event has been propagated already all the way up to the document). By the way maybe that could be considered a bug of dojo/touch...
Maybe this also fixes the Android problem but I could not test, so this should be tested on Android before committing.
comment:8 Changed 9 years ago by
Cc: | cjolif added |
---|
comment:10 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Priority: | undecided → high |
I have tested that browser scroll is NOT an issue (that is, the bug does not hurt when the IconContainer is inside, say, a dojox/mobile/View). The trouble was only with our scrollable view.