Bug 25932 - WebView height returned by JQuery incorrect on Android API 19 and up
Summary: WebView height returned by JQuery incorrect on Android API 19 and up
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: 1.3.4
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-12 12:53 UTC by John Miller [MSFT]
Modified: 2015-02-12 05:34 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test Case (88.01 KB, application/zip)
2015-01-12 12:53 UTC, John Miller [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description John Miller [MSFT] 2015-01-12 12:53:02 UTC
Created attachment 9322 [details]
Test Case

**Overview:**

   The attached Forms app reproduces an issue where the height of a WebView is returned as 0 from Javascript. The same html loaded in a non-forms app does not reproduce this issue and works as expected. 

**Steps to Reproduce:**

   1. Run the attached "AndroidFormsWebView" project and an API 19+ simulator or device.

**Actual Results:**

   The height alerted on launch reports 0.

**Expected Results:**

   The height returned should be non 0. 

**Build Date & Platform:**

   XF 1.3.1
   XA 4.20
   Android Api 19+

**Additional Information:**

   Also attached is a non Forms app that loads the same HTML in a WebView and does not have an issue. This seems to indicate an issue in Forms. 
 
   Running the sample in Step 1 on a Api < 19 device or simulator will produce the expected results and not have an issue.
Comment 1 Udham Singh 2015-01-13 08:45:01 UTC
We have checked this issue with the help of attached sample and observed the same behavior mentioned in bug description. Please refer the screencast : http://screencast.com/t/CjoyauAps

Application output:
https://gist.github.com/saurabh360/e47478c710f03caea469

Environment info:

Xamarin.Forms : 1.3.1.6296

=== Xamarin Studio ===

Version 5.7 (build 661)
Installation UUID: ff0c16c6-3c75-46d8-ac56-56c3b56e2c76
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.0.51 (Trial Edition)
Hash: dfb682f
Branch: 
Build date: 2015-01-08 13:39:32-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Indie Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.12.0.0 (Indie Edition)

=== Build Information ===

Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

=== Operating System ===

Mac OS X 10.10.1
Darwin Apples-iMac.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 3 Jason Smith [MSFT] 2015-02-06 00:37:15 UTC
This should be fixed in 1.3.4-pre1
Comment 4 Udham Singh 2015-02-10 07:09:36 UTC
I have checked this issue with Xamarin.Forms Version  1.3.4.6325-pre1 and still getting the reported behaviour. 

As of now I am reopening this issue and please let me know with which build should I check to verify this issue ?

Please refer the screencast : http://www.screencast.com/t/KH5G1zWLC

Environment Info :

Xamarin.Forms : 1.3.4.6325-pre1 and

Mac OS X 10.9.5
Xamarin Studio 5.7.1 (build 17)
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)
Xcode 6.2 (6770)
Xamarin.iOS 8.6.1.24 (Business Edition)
Xamarin.Android 4.20.0.28 (Business Edition)
Comment 5 Jason Smith [MSFT] 2015-02-11 18:32:46 UTC
This reproduction case here does not use the correct webview renderer for the
platform so it did not get hte fix. They need to set the LayoutParams of their
custom android webview to be MatchParent to get the fix. Since they are completely replacing the renderer we cannot assist with this, the problem is now in their code, but if you use the default renderer it works.
Comment 6 Ram Chandra 2015-02-12 05:34:56 UTC
As per comment 5 , this issue had been fixed.

Hence I am closing this issue.