-
14 Mar 2011 12:07 PM #1
Activate Listener fires twice
Activate Listener fires twice
When you use setActiveItem on a Carousel to move to a specific card, the Activate event fires twice.
Is there a workaround for this, and/or is this a known bug?
-
14 Mar 2011 1:24 PM #2
Test in example code
Test in example code
You can see this in action. In the examples/carousel2 folder of 1.02, add/replace the following at line 52 of index.js
You can see in the console that when you swipe, the event only fires once, but when you use the buttons (which is setActiveItem) it fires twice.Code:html: rec.get('content'), cls: 'card ' + rec.get('cls'), listeners: { activate: function(){ console.log(rec.internalId); } }
Thanks for any help!
-
15 Mar 2011 11:09 AM #3
-
17 Mar 2011 6:30 AM #4
BUMP: Any response
BUMP: Any response
Is there some reason that this is being ignored by Sencha support?
I would just like an answer as to whether there is a work-around, or if a fix will be coming in the future.
-
26 Apr 2011 3:20 PM #5
-
22 May 2011 2:54 PM #6
I am also experiencing this. After looking into the Card Layout's setActiveItem() code, I decided I'd leave a proper fix up to the Sencha dev team

Here is my workaround:
By the way, this thread is about the same issue: http://www.sencha.com/forum/showthre...ires-twice-whyCode:this.on('activate', function() { /* * The activate listener fires twice, so ignore it if it's * recently fired */ if (me.ignoreActivate) { return; } me.ignoreActivate = true; ext.defer(function() { me.ignoreActivate = false; }, 1000); // put the rest of your activation code here });
-
4 Jun 2011 4:10 PM #7
Is this only a problem with the carousel?
I don't see this with tabpanels.
-
26 Sep 2012 6:20 PM #8
i also encountered this with Ext.dataview.List
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Activate event fires twice - why?
By Tiffany A in forum Sencha Touch 1.x: DiscussionReplies: 9Last Post: 26 Mar 2012, 1:28 PM -
getCard not available from tab activate listener
By meyerovb in forum Sencha Touch 1.x: BugsReplies: 7Last Post: 30 Jun 2010, 11:31 AM -
Listener never fires ... help
By wgpubs in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 12 Dec 2008, 3:03 AM -
Tabs activate listener - odd behavior
By str2etboy in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 20 Jun 2008, 9:53 AM -
how to get tab panel title from activate listener
By vik in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 29 May 2008, 9:58 AM


Reply With Quote