incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [44/46] wp7 commit: back button fix
Date Sat, 14 Jul 2012 00:24:43 GMT
back button fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/093d645c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/093d645c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/093d645c

Branch: refs/heads/master
Commit: 093d645c597b51ab5e570f8421cc1113a8989435
Parents: ed93749
Author: Sergei Grebnov <sergey.grebnov@akvelon.com>
Authored: Tue Jul 10 14:52:18 2012 +0400
Committer: Sergei Grebnov <sergey.grebnov@akvelon.com>
Committed: Tue Jul 10 14:52:18 2012 +0400

----------------------------------------------------------------------
 framework/CordovaView.xaml.cs |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/093d645c/framework/CordovaView.xaml.cs
----------------------------------------------------------------------
diff --git a/framework/CordovaView.xaml.cs b/framework/CordovaView.xaml.cs
index f9a6e0b..8a14362 100644
--- a/framework/CordovaView.xaml.cs
+++ b/framework/CordovaView.xaml.cs
@@ -338,9 +338,14 @@ namespace WP7CordovaClassLib
                 try
                 {
                     PageDidChange = false;
+
+                    Uri uriBefore = this.Browser.Source;
                     // calling js history.back with result in a page change if history was
valid.
                     CordovaBrowser.InvokeScript("eval", new string[] { "(function(){window.history.back();})()"
});
-                    e.Cancel = PageDidChange;
+                    
+                    Uri uriAfter = this.Browser.Source;
+
+                    e.Cancel = PageDidChange || (uriBefore != uriAfter);
                 }
                 catch (Exception)
                 {


Mime
View raw message