Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A38F69914 for ; Tue, 3 Jan 2012 18:59:04 +0000 (UTC) Received: (qmail 81610 invoked by uid 500); 3 Jan 2012 18:59:04 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 81588 invoked by uid 500); 3 Jan 2012 18:59:04 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 81581 invoked by uid 99); 3 Jan 2012 18:59:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2012 18:59:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.114] (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2012 18:59:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B833D31576F; Tue, 3 Jan 2012 18:57:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bowserj@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [44/50] git commit: Backbutton should go back in appview history before going back in our history stack. Message-Id: <20120103185711.B833D31576F@tyr.zones.apache.org> Date: Tue, 3 Jan 2012 18:57:11 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Backbutton should go back in appview history before going back in our history stack. JQMobile uses htmlPage#div to navigate "multipage" apps. When the webview navigates between tags in the same page, it is added to the webview history. Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/fd93404c Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/fd93404c Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/fd93404c Branch: refs/heads/master Commit: fd93404c7c9860194f394361ca83cd0efb5af382 Parents: e9fcb29 Author: Bryce Curtis Authored: Wed Nov 9 09:14:13 2011 -0600 Committer: Bryce Curtis Committed: Wed Nov 9 09:14:13 2011 -0600 ---------------------------------------------------------------------- framework/src/com/phonegap/DroidGap.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/fd93404c/framework/src/com/phonegap/DroidGap.java ---------------------------------------------------------------------- diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index 3db2518..1d8017d 100755 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -1450,7 +1450,11 @@ public class DroidGap extends PhonegapActivity { else { // Go to previous page in webview if it is possible to go back - if (this.urls.size() > 1) { + if (this.appView.canGoBack()) { + this.appView.goBack(); // This is needed to support curPage#diffLink, since they are added to appView's history, but not our history url array (JQMobile behavior) + return true; + } + else if (this.urls.size() > 1) { this.backHistory(); return true; }