Comments (13)
Hi there @aboudard, no I believe this is not "normal". What version of Fries are you using?
from fries.
I use 1.0.0 according to the readme, I juste downloded the master.
I tried just now to catch the backbutton with phonegap, but with no success, I try harder :D
from fries.
Alright. Can you try doing a console.log()
inside the code where you try to catch the back button? I'm very willing to help you with your problem. :)
from fries.
I am right now :)
I can't load any console at all on new-contact.html ...
Added this in the bottom of the page (works perfect in index.html)
<script src="js/cordova-2.7.0.js"></script>
<script>
window.addEventListener('load', init, false);
function ready(e){
console.log("Loaded");
document.addEventListener("backbutton", onBackKeyDown, false);
}
function onBackKeyDown() {
window.history.go(-1);
console.log("Back");
}
function onError(error) {
console.error(JSON.stringify(error));
}
function init(e){
document.addEventListener('deviceready', ready, false);
console.log("Init Loaded");
}
</script>
from fries.
But will the app still exit if you press the back button on index.html
?
Edit: I currently don't have an Android phone right now that's why I'm asking. xD
from fries.
Well, it seem like there is really a problem with the back button, when I have activated multiple tabs, it looks like application is freezing, and sometimes I see the pages with no style at all ... pretty bad ... I try to see if this behavior is caused by the webview component, I'll install Fries on a http server to be sure.
from fries.
Hmm. That's odd. Is there any particular reason why you're catching the back button functionality? Cause when I tested this, I never had to catch the back button and still it works fine.
By the way, the style on other pages does not load if stack.js fails to load properly in index.html
.
from fries.
Yes, that's very strange. here is what I did :
- I see that pressing back button on the device makes me go out of application even when I am on new-contact.html for example.
- I think "hey let's see what phonegap says in the backbutton event"
- I plug phonegap.js, set the listener (in new-contact.html)
- no luck, absolutely no javascript is loaded, native or phonegap event ... none
- I plug phonegap.js and listeners in index.html > events work just fine
...
I keep on :)
from fries.
@aboudard I just tested your code for the back button issue on a phonegap project with Fries, the problem is non existent. In addition to that I highly doubt that the problem is stemming from stack.js , I suggest trying on the side a new Phonegap project without Fries and implement dynamic page loading (which is similar to how Stack.js does) and test the app on the same device.
from fries.
Well there is no "code of mine" to test, my simple test was to install both on a device and an emulator a simple Android / Phonegap app with fries demo pages.
I will try to work on a brand new project like you say, thanks for the advice.
from fries.
Ok, I made a new Phonegap app with phonegap build, starting from both sample project from Fries and Phonegap-start, and the problem doesn't happen !
My first phonegap project (with the bug) was built with the Android dedicated ant command line "create" ... I will try to reproduce, that might be a good advice ... not using this build ... :|
that would be more relevant than saying "non existent" ;)
from fries.
Thanks @aymanfarhat. I couldn't test the problem.
@aboudard you could also try to build and install https://github.com/jaunesarmiento/HelloFries on your device. That project was made using ./create <project_folder_path> <package_name> <project_name>
command from the Cordova Android distribution.
from fries.
Back button seems to be working fine on v2.0.0
from fries.
Related Issues (20)
- Material design
- Outdated Documentation Ratchet Link HOT 1
- Deprecated jekyll command line in README.md - Revert 722f50d
- Project websites officially dead!? HOT 5
- swich on/off and radio button not working HOT 7
- Support for Android versions lower than 4.0 HOT 1
- Navigation logic with back button HOT 3
- Display crash losing css + js
- when we will meet navigation drawer HOT 2
- Onclick function won't run on buttons, and anchor tags. HOT 1
- Examples+Site examples do not work. HOT 1
- Keyboard overlap on field (textbox) of form. HOT 4
- Load next page when clicking HOT 2
- broken on android 4.4.2 ? HOT 2
- Checkboxes in lists HOT 1
- Form elements are not working HOT 3
- Fries as a chrome app HOT 1
- Merged theme branches and examples HOT 9
- Sliding between tabs
- Switching between tabs not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fries.