Opened 7 years ago

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

When IconContainer is contained in a dojox.mobile.ScrollableView, the editing operation misbehaves as soon as the view is scrolled.

How to reproduce:

  1. Launch dojox/mobile/tests/test_IconContainer-pubsub.html

Dojo 1.8b1

(reproduced on iPhone 4S iOS 5.0.1 and Chrome 19).

  1. Press the "Start Edit" button (or do a long touch on an icon).
  1. 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.
  1. 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)

patch15623.patch (1.7 KB) - added by Adrian Vasiliu 7 years ago.
Fix misbehavior in editing mode inside ScrollableView - Adrian Vasiliu, IBM, CCLA
patch15623_2.patch (2.3 KB) - added by Eric Durocher 7 years ago.
New patch that fixes the double scrolling problem - Eric Durocher (IBM, CCLA)

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 years ago by Adrian Vasiliu

I have tested that browser zoom 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.

Version 0, edited 7 years ago by Adrian Vasiliu (next)

comment:2 Changed 7 years ago by cjolif

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 7 years ago by Adrian Vasiliu

Attachment: patch15623.patch added

Fix misbehavior in editing mode inside ScrollableView - Adrian Vasiliu, IBM, CCLA

comment:3 Changed 7 years ago by Adrian Vasiliu

Argh. Reattached the correct patch. Thanks.

comment:4 Changed 7 years ago by cjolif

Description: modified (diff)
Version: 1.7.31.8.0b1

comment:5 Changed 7 years ago by cjolif

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 7 years ago by cjolif

Status: newopen

Changed 7 years ago by Eric Durocher

Attachment: patch15623_2.patch added

New patch that fixes the double scrolling problem - Eric Durocher (IBM, CCLA)

comment:7 Changed 7 years ago by Eric Durocher

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 7 years ago by cjolif

Cc: cjolif added

comment:9 Changed 7 years ago by Damien Mandrioli

Test on Android 2.3 and 4.0 is OK

Last edited 7 years ago by Damien Mandrioli (previous) (diff)

comment:10 Changed 7 years ago by cjolif

Milestone: tbd1.8
Priority: undecidedhigh

comment:11 Changed 7 years ago by cjolif

Resolution: fixed
Status: openclosed

In [29222]:

fixes #15623. Fixes issues while editing icons in a ScrollableView? (+ little code cleanup). Thanks Eric Durocher & Adrian Vasiliu (IBM , CCLA).

Note: See TracTickets for help on using tickets.