cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject git commit: CB-5418 BrowserMouseHelper fails on WP8 for WP7 apps
Date Tue, 19 Nov 2013 00:02:46 GMT
Updated Branches:
  refs/heads/3.2.x 00c8fe38c -> 073240e43


CB-5418 BrowserMouseHelper fails on WP8 for WP7 apps


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/073240e4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/073240e4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/073240e4

Branch: refs/heads/3.2.x
Commit: 073240e430198c6b266ecaf6800b75ac6b7ba6ab
Parents: 00c8fe3
Author: purplecabbage <purplecabbage@gmail.com>
Authored: Fri Nov 15 15:03:54 2013 -0800
Committer: purplecabbage <purplecabbage@gmail.com>
Committed: Mon Nov 18 16:02:19 2013 -0800

----------------------------------------------------------------------
 wp7/template/cordovalib/BrowserMouseHelper.cs | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/073240e4/wp7/template/cordovalib/BrowserMouseHelper.cs
----------------------------------------------------------------------
diff --git a/wp7/template/cordovalib/BrowserMouseHelper.cs b/wp7/template/cordovalib/BrowserMouseHelper.cs
index acd1bcd..0e87de8 100644
--- a/wp7/template/cordovalib/BrowserMouseHelper.cs
+++ b/wp7/template/cordovalib/BrowserMouseHelper.cs
@@ -117,7 +117,15 @@ namespace WPCordovaClassLib
             var border1 = VisualTreeHelper.GetChild(border0, 0);
             var panZoom = VisualTreeHelper.GetChild(border1, 0);
             var grid = VisualTreeHelper.GetChild(panZoom, 0);
-            border = VisualTreeHelper.GetChild(grid, 0) as Border;
+            var gridChild = VisualTreeHelper.GetChild(grid, 0);
+
+            border = gridChild as Border;
+            // windows phone 7 sdk apps running on windows phone 8 os have an additional
child in the visualtree
+            // if border is null, we probably need to go one deeper.
+            if (border == null)
+            {
+                border = VisualTreeHelper.GetChild(gridChild, 0) as Border;
+            }
 
             if (border != null)
             {


Mime
View raw message