Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4478] Android: WebView auto scrolling does not work when focus on input field

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2016-10-13T19:53:41.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid
ReporterChristoph Eck
AssigneeShak Hossain
Created2016-09-19T16:39:55.000+0000
Updated2016-10-13T19:53:41.000+0000

Description

The focus on an input field in a webview starts an autoscrolling of the webview itself. But if the parent view of a webview has a fix height the webview autoscrolling does not work. *Steps to reproduction*

Click on Googles search field

The webview does not automatically scroll up

*Expected behaviour*

Click on Googles search field

The webview does automatically scroll up, so the user can see what he is typing

*Question* Is this an Android or Titanium issue? *Test case* index.js
var win = Ti.UI.createWindow({
});

var wrapperview = Ti.UI.createView({
    top : 0,
    left : 0,
    height : 615,
    width : 360,
    backgroundColor : 'blue',
});

var verticalLayoutView = Ti.UI.createView({
    height : 500,
    width : Ti.UI.FILL,
    layout : "vertical",
    backgroundColor : "yellow",
});

var redView = Ti.UI.createView({
    height : 20,
    width : Ti.UI.FILL,
    backgroundColor : "red"
});
var webview = Ti.UI.createWebView({
    top : 20,
    height : Ti.UI.FILL,
    scalesPageToFit : false,
    hideLoadIndicator : true,
    enableZoomControls : false,
    ignoreSslError : true,
    borderColor : "black",
});
verticalLayoutView.add(redView);
verticalLayoutView.add(webview);


wrapperview.add(verticalLayoutView);
win.add(wrapperview);

win.open();

webview.setUrl("https://www.google.com");

Comments

  1. Sharif AbuDarda 2016-09-19

    Hello, Your description is not clear. I have tested your issue with the sample code. When I click on the Google search field The webview does not automatically scrollup. Please clear your query. Thanks.

JSON Source