Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 26
Registered: ‎06-17-2013
My Device: Z10

Input field in webpage doesn't work properly in webView, but works in external browser.

Hello

 

I have a webview in my app.  It runs properly, but the content in any text field from any website doesn't scroll when my input is wider than the text field, it still show the first part of my input.

 

To narrow down this issue, I load the same code from BB10 reference website

http://developer.blackberry.com/native/reference/cascades/bb__cascades__webview.html#function-mincon...

and replace the url with google login website.

 

Page {

    ScrollView {

        id: scrollView

        scrollViewProperties {

            scrollMode: ScrollMode.Both

            pinchToZoomEnabled: true

        }

        layoutProperties: StackLayoutProperties { spaceQuota: 1.0 }

        

        Container {

            background: Color.LightGray

            

            WebView {

                id: webViewScrollable

                url: "https://accounts.google.com/o/oauth2/device/usercode"

                

                onMinContentScaleChanged: {

                    scrollView.scrollViewProperties.minContentScale = minContentScale;

                }

                

                onMaxContentScaleChanged: {

                    scrollView.scrollViewProperties.maxContentScale = maxContentScale;

                }

            }

        }

    }

}

 

I input a very long email(abcdefghijklmnopqrstuvwxyz@abcdefghijklmnopqrstuvwxyz.com) in the webpage, the input field does not scroll to show the last character I input. 

 

The external browser runs properly, shows "qrstuvwxyz@abcdefghijklmnopqrstuvwxyz.com" when I was typing.  But the webview in my app only shows "abcdefghijklmnopqrstuvwxyz@abcdefghijklmno" and I cannot move the cursor to the end of my input.

 

On top of this issue, I saw 1/5 white area in the bottom of the screen.  I added 

                preferredHeight: Infinity 

 to fix this white area issue.

 

I expect the webview works exactly as external browser with all default settings, but looks like it doesn't. I am wondering if other developers hit the same issue.  

 

Thanks for any advice in advance.

 

Tyler

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Input field in webpage doesn't work properly in webView, but works in external browser.

Hi Tyler,

 

I can confirm that I've reproduced this issue on 10.2 in a Cascades WebView, though the native Browser handles the cursor movement just fine. Could you please log a JIRA issue here:

https://www.blackberry.com/jira/secure/Dashboard.jspa

 

And notify us on this thread with the URL once you've done so?

 

Since I've already verified it, I'll jump in there to add a bit more information and will escalate it to our developments teams so that the WebView control can be fixed directly.

 

Let me know if you have any questions.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Contributor
Posts: 26
Registered: ‎06-17-2013
My Device: Z10

Re: Input field in webpage doesn't work properly in webView, but works in external browser.

Thanks oros.

 

Here is the jira ticket 

 

https://www.blackberry.com/jira/browse/BBTEN-1643

 

Hope this could be fixed sooner.

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Input field in webpage doesn't work properly in webView, but works in external browser.

Much appreciated Tyler. I've added a few notes to it and escalated to our development teams. Just a note that we'll likely need a tools/OS update before a fix can be integrated on public devices.

 

I do apologize for the inconvenience this causes in your development. Our dev teams are working hard to bring the WebView inline with the native Browser but there are still areas that need to be addressed.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Contributor
Posts: 26
Registered: ‎06-17-2013
My Device: Z10

Re: Input field in webpage doesn't work properly in webView, but works in external browser.

Thanks Erik!