how to overcome on unresponsiveness of buttons using Phonegap? - javascript

Buttons in my application using Phonegap + Eclipse sometimes don't respond to the onclick event, making the App looks like it's frozen.
If I scroll the page up and down, sometimes they start working, but this can be accepted as a solution to the problem.
I've updated Cordova to version 2.7.0 but I still have the same issue.
Could anyone please help me on this situation?

Don't do much in Click handlers.
It freezes because the main thread is blocked by the click handler. Then everything stops. Do as much as you can on the server.

I use this NoClickDelay
I did end up making some changes to it so that the touch and move worked better. I was finding that if your finger moved even the slightest it did not register the click. I increased the tolerance and it worked fine.
something like
if (Math.abs(e.changedTouches[0].screenX - this.startX) < 30 && Math.abs(e.changedTouches[0].screenY - this.startY) < 30 ) {
this.theCallBack();
}

Related

Press behaviour Ionic / Angular / Cordova App in mobiles

This is something that is bugging me a lot. I see a lot of hybrid apps made in HTML5/JS that present this problem. To date, I havent found a reliable solution.
The problem is that, in mobile, with the regular and more used angular event: (click), as so:
<button (click)="dosomething()"></button>
There are 2 major problems:
When you press on it, and you do a long press, it will never, ever call the click action. If you havent defined or coded a long press, this a very very very very very bad UI behaviour. The "tap" is, therefore, badly implemented. If you go to your android calculator, you'll see that when you press a number, and wait 5 seconds, when you release, it will trigger. Which is how it should work.
If you press it and move slightly, the action will not trigger. This is also something that is quite bad for UX purposes.
Does anyone know a solution to this or an alternative?

Scroll on mobile stops Vue.js click events from firing

Vue.js click events do not fire when the page has even been slightly scrolled on mobile. This applies to both Chrome and Safari on iPhone. Click events still work if they are clicked and the page isn't moved, but as soon as it is scrolled (even slightly), they cease to work.
I've tried adding cursor: pointer; to my CSS, and I've tried removing different plugins and functions. I've tried running a production build as well. However nothing works.
It seems like a very strange issue, and it appears across two different pages but only on mobile. I haven't been able to find any examples of this happening to anyone else before. I have a lot of code, so difficult to know what to put here also.
Any help would be very much appreciated, thank you!

Samsung Tizen TV catch right click event

I have some problem with catching right click event on my web app, tried to use window.oncontextmenu, but for some reasons unknown to me it is not work on Tizen. But when I debug my app via desctop browser, everything work as it should.
What I need to do to activate right click event handler on Samsung TV Tizen?
in general I have lowered my expectations in regards to what will work with the browser running on Tizen displays.
Anyway, a few things that may help you:
Firstly there are oftentimes issues with privileges on Tizen, it's possible that is a problem for you. You can check the privileges available to you for any related to mouse input.
Also I was able to find:
<feature name="http://www.samsungdforum.com/feature/Mouse"/>
Sadly it seems no one really knows what this is or what it does, as the documentation is very poor.
Since you are testing using your device I suspect you have also tested left click. Presumably if that is working it is likely not a privilege issue. In this case I suggest trying a different approach, as I remember to have encountered trouble with events on SAMSUNG browsers as well in the past:
http://developer.samsung.com/tv/develop/guides/user-interaction/mouse
There is some info on setting up the onEvent callback properly.
Last but not least, instead of
window.oncontextmenu
try
document.oncontextmenu

Firefox page load event very long

I'm going to try to explain an issue that scratch my head...
When I open this website for the first time after opening Firefox (v43.0.3), the UI freeze during about 20 seconds and I don't undersand why. For example you can see that the background image appear after almost 20 seconds...
So, I used firebug net panel to try to understand where the problem comes from and I notice that the page load event is very long but I can't see any tasks executing during this event.
here is a screenshot of firebug Net Panel
When I open the website with Chrome it works fine, does someone has ever encounter that kind of problem ?
I hope that makes sense, thank you in advance.
You're making 31 requests (according to my NET panel - FireBug) which add to 323ms (at least in my case). Your background image is loading ~1s after. Maybe if you'd try to reorganize all that sprites you're requesting into less files - but it seems fair as loading time for me.
I once had a problem with Firebug itself. I had to turn it off and\or uninstall to get the page load normally on Firefox.
In my case it was an effect of problem between Firebug and Telerik Kendo JS Library.
Maybe you have a problem similar issue.
Thanks for your answers, indeed it seem's to comes from my firefox configuration or addons/plugins.
I use a Firefox pre-configured by my socity, so I installed a portable firefox to try if it works and the website is loading normaly.
Now I just have to find from whitch config or addons/plugins the problem comes from, thanks again !

Intel Edison app not updating

I installed the IoT XDK and loaded the blink example. The LED on pin 13 blinks! Great! I changed the interval from 1000ms to 100ms and to 3000ms and reuploaded to the Edison. No change. Light still blinks every second same as before. I even changed the app version info to try to force it to see the update.
I must be missing something obvious.
I've had several, similar, happenings! What I've done since is get into the routine of:
+ Stopping the app (the far right icon, the one you click to run the app)
+ Then click the stop app icon (next to it on the left)
+ Save my file
+ Click upload
+ Click run
Going through this process I never run into the issue you describe. When I do forget a step, I can often replicate what you experience!
Good luck!
The latest software update appears to have solved my issue. I can now vary the duration of the LED pause in the sample code and successfully update my app on the Edison.

Categories