Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member watrboy00's Avatar
    Join Date
    Aug 2007
    Location
    Minneapolis, MN
    Posts
    473
    Vote Rating
    0
    watrboy00 is on a distinguished road

      0  

    Question 0.82 scrollend fires after touchend

    0.82 scrollend fires after touchend


    Using this example...

    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>
    will generate the following output by touching and dragging your cursor across the screen:

    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...}]
    Seems like 'touchend' should come after 'scrollend'. Any thoughts as to why it was setup like this?
    Eric Berens
    Intranet Systems Manager @ Best Buy
    You should follow me on twitter here.

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    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.

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Helped in the spinner as well Tommy.

Similar Threads

  1. Listener never fires ... help
    By wgpubs in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 12 Dec 2008, 3:03 AM
  2. cellselect fires twice
    By phpcs in forum Ext 2.x: Bugs
    Replies: 0
    Last Post: 6 Jul 2008, 1:17 AM
  3. [2.1] rowselect fires twice
    By KevinChristensen in forum Ext 2.x: Bugs
    Replies: 1
    Last Post: 20 May 2008, 3:56 AM
  4. onLoad fires not
    By Desian in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 24 Oct 2007, 2:58 AM
  5. treeLoader fires only once
    By carstep in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 29 Aug 2007, 3:35 AM

Thread Participants: 2