I am working on a mobile site, my first, and I am facing strange problems. I have created a custom jQuery slider with left and right buttons. I have tried it on my Android's own browser, Firefox and Chrome for Android. It works fine, as it is supposed to.
When I gave the work to my client he said it doesn't work on iPhone for which it is originaly intended. I was confused as how this is possible, as it worked flawlessly on my Android. So I asked my friend for his iPhone 4S with iOS7 and opened up the site. To my surprise, the slider did not work. I took out my phone and opened it on my Firefox, it worked!
Why is this so? If it is working on Android, shouldn't it be working on iOS too? And how can I solve it?
Regards
I came to know why this happens. By default, iOS Safari doesn't allow everything to be "clickable". This means you need to make it cursor: pointer via CSS to make it "clickable".
I have got my answer from here: This link tell is why this happens. Read it!
Regards
Related
If i use https://trelki.de/ on my S10+ device using latest chrome i am unable to scroll.
I tried chrome dev tools, works. it works in every browser except of the current chrome. someone is causing this, because my scrolling works on other pages.
firefox works, opera works, edge works, chrome desktop (arch linux) works, also.
watch https://trelki.de/
i just want people to scroll that page and find the reason for this.
this page is completely self-written, so i have control about absolutely everything.
Thanks in advance
I have developed an app using HTML5 and CREATEJS. I am encountering some issues that I cannot find a solution, for weeks. I hope someone can help.
1)On Android Google Chrome there is a problem that appears when I simply click anywhere on the screen: the FPS drops and any animation that is playing freezes for the duration of my touch. The problem is only in Mobile Chrome browser, on Android. It does not exist in other mobile browsers, neither in iPhone, neither in Safari, Firefox, etc.
I created a simple apk using webview and it doesn't have the problem either. So for some reason, the problem is only in mobile android chrome.
The code is optimized at maximum. 2 months ago we used only 1 canvas, but now we use multiple canvases and we have less animations in each canvas running everytime. While in android firefox it works perfect, but in android chrome it freezes for a single click.
I tried to disable stagemousedown/up events, because they are being triggered when I simply click anywhere in the stage. This didn't fix the problem or it is possible that there are some hidden stagetouch events that I don't know how to disable.
2)On Android Google Chrome and iPhone6 Safari, when I click the SPIN button, the game starts the SPIN, but with a delay of at least 1.5 seconds, but there is no such delay added with intention inside the code. On PC any browser, Android/iOS Mobile Firefox, this works perfect, no delay. In iOS Safari iPhone8 again it works perfect.
I created a simple apk using webview and it doesn't have this problem either. So for some reason, the problem is only in mobile android chrome.
UPDATE 11/10/19: Issue 2 has been solved by reducing canvas size and removing all shadow effects which consumed a lot of memory. Issue 1 still remains unsolved with absolutely no ideas left to try out. Any help is appreciated.
My project is 99% completed except these 2 issues. I am hoping to be able to fix them, because I really do not want to throw away months of work and switch to other javascript library for gaming, that doesn't have the problem, like PIXIJS.
I tried with RAF and RAF_SYNCHED, but still no improvement in any scenario.
Stage.update() is required for any animation. Having them on ticker is the reason why its getting slower.
To see the problem in action, please open this URL: http://www.nevergone.biz/DEMO_CODE/index.html
How to test: Open the link above in Android Google Chrome portrait mode and then click SPIN. During SPIN click above the game canvas or anywhere. Notice that everything freezes.
The code was extracted only for testing these issues, so after a few spins it may freeze. I will fix this tomorrow, but I hope someone can give some ideas for solving the problem.
Problem #1 is apparently isolated on some older devices that use Android Google Chrome. The problem is somehow caused by CREATEJS using too many listeners on the stagedown event. I am currently waiting for the developer of the framework to give an answer or for Chrome to receive a serious update.
Problem #2 was fixed by removing all text-shadow CSS effects which apparently were consuming a lot of memory.
cache might work.
var testShape=new createjs.Shape();
testShape.graphics.beginFill("red").rect(0,0,100,100);
testShape.cache(0,0,100,100);
stage.addChild(testShape);
// If you make changes and want to refresh the cache
testShape.updateCache()
Could anyone explain me how to show confirm dialog on page refresh on iOS devices?
We use window.onbeforeunload handler on desktop, it works fine and as we expect. But the problem was found when we tried to check hot it works on iOS devices.
I found a lot of information here about pagehide and unload events, and that they work fine on iOS devices, but all my attempts was failed.
Please, help me and provide working code example. (I'm testing app on iPad Air 2, iOS 9.3.2).
I am working on this site "http://tinyurl.com/joblnmd". On home page there'gif animation, I've used preload method to load images, its working on all major browsers expect safari on Mac.
Is this bug in safari or is there any hack?
New Post: I've looked at the site again and there doesn't seem to be any problems. The loading hourglass appears for a long time, but it eventually disappears and the main content of the page is visible. It might be best for your to provide a JSFiddle with just the area in question so that I, or someone else, can have a proper look and help you solve your problem.
Old Post: Maybe you need to update your browser. My Mac Safari appears to show everything perfectly. But I'll check again later tonight. The animation looks very nice.
Got a strange one, the app runs fine in the browser, but when on an android device none of the page transitions work. I have checked in logcat and I can see the address changing to include the hashtag however the other page never loads.
I am using multipages so I have like 3-4 jqm pages within 1 html page and depending on button presses it moves to another one. I have tried disabling ajaxEnabled, I have tried using javascript to changePage($("#some-page")); none of it seems to work.
The crazy thing is it works fine in the browser, I have tried in FF, Chrome, Chrome with Ripple Emulator and there are no problems changing pages via href="#some-page" data-ajax="false" or using the changePage method, both work fine.
There are also no errors, as I have tried using the Weinre debugger (which rarely tells me of errors) and the adb logcat and both are clear, no problems from what I can tell. (I had to use adb logcat to debug initial JS errors as the Weinre one didnt list them).
I am using:
JQM 1.4.0 RC 1
Phonegap build (profile 2.9.0)
Android 2.3
Anyway I have googled and checked over and everything that has been suggested I have tried... so any new suggestions? :)
I have had a friend try it on his tablet which is running 4.* and it works as expected on his... not sure what that proves...
As no one else has answered I could not get to the bottom of the issue, it seems to be something to do with android 2.3 as it works fine in all 4.* versions.
I will relinquish the answer to someone who can give a technical reason as to why it does not work but for the moment I will mark this as complete.