[
https://issues.apache.org/jira/browse/CB-11248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15444236#comment-15444236
]
Chris Zagar commented on CB-11248:
----------------------------------
I was having a problem quite like the one described. The first time I opened an
InAppBrowser, the text fields would always work. But if I closed and then
reopened, eventually (1 to several times later) the text input fields would not
show a caret and I could not type anything, even though the keyboard appeared,
suggestions would work and I could copy and paste. It was driving my quite mad.
I finally noticed that if I had the location bar enabled and touched it, then
touched a text edit, I would get the caret. This led me to try many different
things with changes in establishing focus. Right or wrong, the combination I
found that finally gave me consistent behavior was to change onPageFinished to
add calls to clear and request focus like this:
{code}
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
view.clearFocus();
view.requestFocus();
{code}
Once I made this change, touching the text fields always produced a caret.
> InAppBrowser no focus on input text fields
> ------------------------------------------
>
> Key: CB-11248
> URL: https://issues.apache.org/jira/browse/CB-11248
> Project: Apache Cordova
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Plugin InAppBrowser
> Affects Versions: 1.4.0
> Environment: Cordova CLI, Android, Android Studio
> Reporter: Mo Pages
> Priority: Minor
> Labels: android, no-repro, triaged
>
> When opening a webpage with a form in the Cordova default webview or system
> webview focus on an input text box works as normal - a cursor is displayed
> (and if there's any js list its displayed). However when using the
> InAppBrowser the focus cursor does not display at all when you click in a
> text box...the keyboard comes up but no focus cursor.
> I've tried injecting js to focus on the text box but this doesn't do
> anything..Also it makes no difference what value the option
> keyboardDisplayRequiresUserAction is given...Is there a fix for this?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]