Hammerjs double firing on iPad - events

Seeing a weird issue where HammerJS + Angular makes events double fire on 'tap'.
The source / demo:
http://plnkr.co/edit/yjtZsQjRPwiuc8FuM3SO?s=hi&p=preview
On a computer, clicking is one event. On an iPad, tapping is two events. Why? How can I fix?

It seems that the problem stems from HammerJS listening to both touchstart and mousedown events (look at line 351 in hammer.js).
More info at: https://github.com/EightMedia/hammer.js/issues/234
I would suggest you use the angular-gestures module, I've used it and haven't run into this issue: https://github.com/wzr1337/angular-gestures

So the issue is something to do with jquery. It's unclear where the specific issue lies, but not using Hammer + JQuery solved the issue.

Related

Messages rendered halfway off screen?

I'm using the JSQ messages view controller as the detail portion of a master/detail configuration. When I rotate my iPad, the right side of the messages are rendered off the screen. When I call reloadData() the issue goes away.
Is this a known issue? Is it due to something I'm doing incorrectly or should I just call reloadData() and ignore the issue?
Here is a screen shot:
I found an existing issue for this in the bug tracker. There is a solution attached to the issue, but the issue is still open.
https://github.com/jessesquires/JSQMessagesViewController/issues/1042
I don't know if it is a known issue but also I don't think this is a very common use case for most users. I don't think I have ever tested or attempted to run this in a master/detail configuration. The only other thing that I would think to try would be setting a contentInset but truthfully if you have found a solution I wouldn't worry about it too much. I do wonder tho if you rotate your iPad what happens then?
Thanks for sharing and if you find any other more permeant solutions the project is always open for more contributors. 🖖🏽

Strange bug in cocos2d-x

I have found one bug that causes the cocos2d view to stop rendering its contents. The bug can be reproduced using the example project found in Jpsarda's post about integration between UIKit and cocos2d-x.
The link to the website is: http://jpsarda.tumblr.com/post/24983791554/mixing-cocos2d-x-uikit and the link to the project is: http://dl.dropbox.com/u/12856650/Cocos2dxOnUikit.zip.
To reproduce the bug it is sufficient to trigger several times between uikit views and cocos2d views by pressing repeatedly the "Cocos2d-x GO!" button on the first view followed by the "Close" button on the second view. I have also done a video that shows how to reproduce the bug: http://youtu.be/EIvf-Ao6u5I. The bug occurs only on a real device and not on the simulator. Because of this bug it is pretty difficult to create applications that allow the user to switch frequently between cocos2d views and uikit views such the one on which I am working. For the moment I can't understand the root cause and I haven't received a reply on the forum yet. Is there anyone that have an idea/intution/suggestion about the possible cause?
I found the reason. EAGLView is never released and this causes a leak of resources. To resolve the bug in JPSARDA's example it is sufficient to add the following line:
[[EAGLView sharedEGLView] release];
at the end of CCEGELView::release method. This will solve JPSARDA's ( and my application :D ) issues but it is likely that this solution won't work in projects that handle EAGLView's lifecycle in a different way

WP7 - why does click adcontrol then back button cause page backkeypress event fired on form re-entry?

I have a number of Windows Phone 7 apps, which have a main page with a custom BackKeyPress event that on the main form throws a custom exception, in order to pass testing and get to the marketplace.
These forms have an AdControl on them. For some reason, when you click on an Ad, either in testing or production, then hit the back button, the BackKeyPress event is fired on the main form.
I have code in place to handle the issue, but does anyone know why it is giving this behavior? I can understand the event firing when the back button is pressed while on the form, but why is it fired to re-enter the form?
Is this a known bug?
I have implemented code to solve this issue, but if a bug, will my workaround code for an apparent Microsoft issue either be moot or potentially harmful in the future if the bug is fixed?
Has anyone else experienced this issue?
First thing that comes to my mind here is that the main page is not releasing properly when navigating away from it.
I haven't used the MS AdControl in a few months because it is not useful for non-US developers but when I was trying it out I remember that it would hold pages in memory if you did not unregister all the event bindings
So look at shutting it down in OnNavigatingFrom and see if that helps.
I've also encountered this problem. When debugging, it looks like the OnNavigatedFrom event is never fired, so there's no tombstoning that's happening and I don't see any place in code where I can unwire that event.
I figured it out.
You have to wire up events in the Adcontrol.AdEngaged to remove the back or AdDisengaged events to readd the back event handler.

Tap and Hold (Long Press)

Has anyone implemented Tap & Hold in a Windows Phone 7 App yet? I can see a couple of possible approaches KeyDown/KeyUp and a timer or ManipulationStarted/manipulationCompleted and a timer.
However it strikes me that this is a less than idea approach because different apps would have different timer settings leading to inconsistency.
Am I missing something? I was hoping for a TapAndHold event
For all views Hold method is there.
It will handle long press function.
Silverlight Toolkit for Windows Phone adds easy to use gestures support, including On Hold gestures
I'm in the same situation, and I'm looking for "the recommended way". In the meantime, Mike Francis posted a solution on his blog, using Microsoft.Xna.Framework.Input.TouchPanel's gesture recognition within a Silverlight app. I didn't try it.
Start the Timer on Hold Event of GestureLister
and stop it on GestureCompleted event this is really a trick see detail answer on following link
How do I detect when toolkit:GestureListener Hold has stopped?
Button b = new Button();
b.Hold += new EventHandler<System.Windows.Input.GestureEventArgs>(HoldEventHandler);
The above code should work for touch and hold event

jQuery Marquee - Resets after four entries in Firefox

Good evening everyone.
I am puzzling over the oddity that the jQuery Marquee plugin, which was working fine, suddenly resets itself after showing only four of six entries here: http://site427.mysite4now.net/tazthedog/site1/ (click on the Upcoming Events tab in the lower-right hand corner).
This works correctly in IE and Chrome on a PC, but in Firefox on a Mac and PC it resets after four.
Any ideas why it resets?
Thanks in advance for the help.
Doesn't seem to be a problem for me in Chrome 5. What browser are you seeing this bug in?
Edit:
Ah, I got it in Firefox. Could be any number of things. Looks like it might be an edge detection thing. Or the height they pull from the page isn't the proper height needed for the animation. Chrome displays this properly, so you might want to check the "hitedge" and "height" variables to make sure they are properly assigned and defined. It could also be a timing thing or some sort of event delay with Firefox. Try upgrading to the latest version of jquery 1.4.2 to see if that resolves anything.

Resources