-
8 Jun 2010 1:48 PM #1
0.82 scrollend fires after touchend
0.82 scrollend fires after touchend
Using this example...
will generate the following output by touching and dragging your cursor across the screen:Code:<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Scroller</title> <link rel="stylesheet" href="../../resources/css/ext-touch.css" type="text/css" /> <style type="text/css"> #content { height:500px; width:500px; } </style> <script type="text/javascript" src="../../ext-touch-debug.js"></script> <script language="javascript" type="text/javascript"> Ext.setup({ onReady: function() { var config = { bounces: false, momentum: false, horizontal: true, scrollbars: true, vertical: false }, el = Ext.fly('content'), scroller = new Ext.util.Scroller(el, config); Ext.util.Observable.capture(scroller, function() { console.log( arguments ); }); } }); </script> </head> <body></body> </html>
Seems like 'touchend' should come after 'scrollend'. Any thoughts as to why it was setup like this?Code:["touchstart", Object { event=Object, more...}, Object { bounces=false, more...}] ["scrollstart", Object { event=Object, more...}, Object { bounces=false, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["scroll", Object { bounces=false, more...}, Object { x=0, more...}] ["touchend", Object { event=Object, more...}, Object { bounces=false, more...}] ["scrollend", Object { bounces=false, more...}]
-
8 Jun 2010 9:39 PM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
I actually gave this a lot of thought and switched several times, but basically the touchstart, touchend, and touchmove events are always fired before any other events in their category. The idea behind this is that it gives them the ability to return false and cancel the firing of more "specialized" events like tapstart, scroll, swipe, tap etc. That is very useful in a lot of situations.
My reasoning might be wrong here, so I would definitely like to hear your arguments for firing them afterwards. I will also discuss this with Aaron and Jamie tomorrow.
I believe Carousel was one of these examples where this order of firing helped me out, but there are other cases as well.
-
8 Jun 2010 11:28 PM #3Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
Helped in the spinner as well Tommy.
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Listener never fires ... help
By wgpubs in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 12 Dec 2008, 3:03 AM -
cellselect fires twice
By phpcs in forum Ext 2.x: BugsReplies: 0Last Post: 6 Jul 2008, 1:17 AM -
[2.1] rowselect fires twice
By KevinChristensen in forum Ext 2.x: BugsReplies: 1Last Post: 20 May 2008, 3:56 AM -
onLoad fires not
By Desian in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 24 Oct 2007, 2:58 AM -
treeLoader fires only once
By carstep in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 29 Aug 2007, 3:35 AM



Reply With Quote
