Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html select element not working in WebView on android tablets #16736

Closed
weremax opened this issue Nov 7, 2017 · 12 comments
Closed

html select element not working in WebView on android tablets #16736

weremax opened this issue Nov 7, 2017 · 12 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@weremax
Copy link

weremax commented Nov 7, 2017

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: OS X El Capitan 10.11.6
Node: 7.3.0
Yarn: 0.27.5
npm: 4.1.2
Watchman: 4.6.0
Xcode: Xcode 8.1 Build version 8B62
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.1 => 0.50.1

Expected Behavior

Expect the select to work on all the platforms it works on android phone but does not work on tablet correctly.

Actual Behavior

  1. Please either reopen the original ticket html select element not working in WebView on android tablets #12070

or

  1. Add a Webview with a source of html or uri your choice same thing either way.
  2. In order for it to work you have to touch an input text field for the focus then when the keyboard is displayed on the tablet the select field works when clicked but click anywhere to hide the keyboard and the select does not work.

Reproducible Demo

See original ticket #12070

@jayfar
Copy link

jayfar commented Nov 13, 2017

I just updated my Samsung SM-T567V tablet from Android 6.0.1 to Android 7.1.1. I suddenly started seeing this issue where html selects are not dropping down in React Native Webview. For me the issue did not appear in Android 6.0.1, but now it does on my updated Android 7.1.1 tablet.

In addition I tried it on a Samsung Phone with Android 7.0 and did NOT see the problem on the phone.

@weremax
Copy link
Author

weremax commented Dec 6, 2017

any status, on this is anyone looking into this?

@weremax
Copy link
Author

weremax commented Dec 6, 2017

Here is some console data from android studio.

  • touch to focus a textfield

12-06 16:29:40.084 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: ViewPostImeInputStage processPointer 0
12-06 16:29:40.138 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: ViewPostImeInputStage processPointer 1
12-06 16:29:40.155 10357-10357/com.selecttest D/InputMethodManager: SSI - flag : 0 Pid : 10357 view : com.selecttest
12-06 16:29:40.162 10357-11858/com.selecttest V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@fff3acb nm : com.selecttest ic=org.chromium.content.browser.input.ThreadedInputConnection@9bdf095
12-06 16:29:40.162 10357-11858/com.selecttest I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
12-06 16:29:40.172 10357-11858/com.selecttest D/InputTransport: Input channel constructed: fd=147
12-06 16:29:40.173 10357-11858/com.selecttest D/InputTransport: Input channel destroyed: fd=148
12-06 16:29:40.312 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: MSG_RESIZED: frame=Rect(0, 0 - 768, 1024) ci=Rect(0, 24 - 0, 359) vi=Rect(0, 24 - 0, 359) or=1
12-06 16:29:40.333 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: Relayout returned: oldFrame=[0,0][768,1024] newFrame=[0,0][768,1024] result=0x1 surface={isValid=true -1405018112} surfaceGenerationChanged=false

  • touch to focus select field

12-06 16:30:02.310 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: ViewPostImeInputStage processPointer 0
12-06 16:30:02.372 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: ViewPostImeInputStage processPointer 1
12-06 16:30:02.398 10357-10357/com.selecttest D/InputMethodManager: HSIFW - flag : 0 Pid : 10357
12-06 16:30:02.403 10357-11858/com.selecttest V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@9b86cbb nm : com.selecttest ic=null
12-06 16:30:02.403 10357-11858/com.selecttest I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
12-06 16:30:02.406 10357-11858/com.selecttest D/InputTransport: Input channel constructed: fd=146
12-06 16:30:02.406 10357-11858/com.selecttest D/InputTransport: Input channel destroyed: fd=147
12-06 16:30:02.406 10357-11858/com.selecttest W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
12-06 16:30:02.448 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: MSG_RESIZED: frame=Rect(0, 0 - 768, 1024) ci=Rect(0, 24 - 0, 0) vi=Rect(0, 24 - 0, 0) or=1
12-06 16:30:02.464 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: Relayout returned: oldFrame=[0,0][768,1024] newFrame=[0,0][768,1024] result=0x1 surface={isValid=true -1405018112} surfaceGenerationChanged=false
12-06 16:30:02.481 10357-10357/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-06 16:30:02.487 10357-10357/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-06 16:30:02.498 10357-10357/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-06 16:30:02.502 10357-10357/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-06 16:30:02.512 10357-10357/com.selecttest D/ViewRootImpl@5286b6d[PopupWindow:7cc1784]: ThreadedRenderer.create() translucent=true
12-06 16:30:02.516 10357-10357/com.selecttest D/InputTransport: Input channel constructed: fd=149
12-06 16:30:02.517 10357-10357/com.selecttest D/ViewRootImpl@5286b6d[PopupWindow:7cc1784]: setView = android.widget.PopupWindow$PopupDecorView{63f23a2 V.E...... ......I. 0,0-0,0} touchMode=true
12-06 16:30:02.527 10357-10357/com.selecttest V/InputMethodManager: Not IME target window, ignoring
12-06 16:30:02.528 10357-10357/com.selecttest D/ViewRootImpl@5286b6d[PopupWindow:7cc1784]: dispatchAttachedToWindow
12-06 16:30:02.564 10357-10357/com.selecttest D/ViewRootImpl@5286b6d[PopupWindow:7cc1784]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[8,166][148,326] result=0x27 surface={isValid=true -1996507136} surfaceGenerationChanged=true
12-06 16:30:02.565 10357-10357/com.selecttest D/ViewRootImpl@5286b6d[PopupWindow:7cc1784]: mHardwareRenderer.initialize() mSurface={isValid=true -1996507136} hwInitialized=true
12-06 16:30:02.568 10357-10357/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-06 16:30:02.571 10357-10357/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-06 16:30:02.573 10357-10357/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-06 16:30:02.576 10357-10357/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-06 16:30:02.577 10357-10357/com.selecttest D/AbsListView: in onLayout changed
12-06 16:30:02.593 10357-10357/com.selecttest D/ViewRootImpl@5286b6d[PopupWindow:7cc1784]: MSG_RESIZED_REPORT: frame=Rect(8, 166 - 148, 326) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1

  • touch to unselect focus anywhere on the form

12-06 16:33:43.415 10357-10357/com.selecttest D/ViewRootImpl@9202840[PopupWindow:15a47c3]: mHardwareRenderer.destroy()#4
12-06 16:33:43.415 10357-10357/com.selecttest D/ViewRootImpl@9202840[PopupWindow:15a47c3]: dispatchDetachedFromWindow

beginning of system
12-06 16:33:43.423 10357-10357/com.selecttest W/InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
12-06 16:33:43.423 10357-10357/com.selecttest D/InputTransport: Input channel destroyed: fd=147
12-06 16:33:43.423 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: ViewPostImeInputStage processPointer 0
12-06 16:33:43.456 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: ViewPostImeInputStage processPointer 1
12-06 16:33:43.466 10357-10357/com.selecttest D/InputMethodManager: HSIFW - flag : 0 Pid : 10357

  • touch to focus select field again with no textfield highlighted

12-06 16:34:12.861 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: ViewPostImeInputStage processPointer 0
12-06 16:34:12.922 10357-10357/com.selecttest D/ViewRootImpl@d03db5f[MainActivity]: ViewPostImeInputStage processPointer 1
12-06 16:34:12.932 10357-10357/com.selecttest D/InputMethodManager: HSIFW - flag : 0 Pid : 10357

@randy-yang
Copy link

randy-yang commented Dec 7, 2017

Reproduce it on my Android 7.1.1 tablet emulator,
The drop-down list will appear when the layout changed,
It looks like there are some problem with drop-down list rendering on tablet ?
ezgif com-optimize

@weremax
Copy link
Author

weremax commented Dec 7, 2017

More information showing this issue.

  • touch to focus select field nothing else on form has focus (select field is highlighted but not working and by working i mean displaying the list of items)

12-07 14:58:34.733 24071-24071/com.selecttest D/ViewRootImpl@1d32b32[MainActivity]: ViewPostImeInputStage processPointer 0
12-07 14:58:34.792 24071-24071/com.selecttest D/ViewRootImpl@1d32b32[MainActivity]: ViewPostImeInputStage processPointer 1
12-07 14:58:34.805 24071-24071/com.selecttest D/InputMethodManager: HSIFW - flag : 0 Pid : 24071

  • rotate the screen orientation for the tablet and the following occurs and the select field displays the dropdown automagically during rotation without any additional stimulus needed.

12-07 14:58:52.295 24071-24071/com.selecttest D/ViewRootImpl@1d32b32[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1024, 768) ci=Rect(0, 24 - 0, 0) vi=Rect(0, 24 - 0, 0) or=2
12-07 14:58:52.343 24071-24071/com.selecttest D/ViewRootImpl@1d32b32[MainActivity]: Relayout returned: oldFrame=[0,0][1024,768] newFrame=[0,0][1024,768] result=0x21 surface={isValid=true -1995919360} surfaceGenerationChanged=false
12-07 14:58:52.343 24071-24071/com.selecttest D/ViewRootImpl@1d32b32[MainActivity]: mHardwareRenderer.updateSurface() mSurface={isValid=true -1995919360}
12-07 14:58:52.382 24071-24071/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-07 14:58:52.387 24071-24071/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-07 14:58:52.405 24071-24071/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-07 14:58:52.408 24071-24071/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-07 14:58:52.419 24071-24071/com.selecttest D/ViewRootImpl@1b7e7a7[PopupWindow:55b5866]: ThreadedRenderer.create() translucent=true
12-07 14:58:52.423 24071-24071/com.selecttest D/InputTransport: Input channel constructed: fd=124
12-07 14:58:52.423 24071-24071/com.selecttest D/ViewRootImpl@1b7e7a7[PopupWindow:55b5866]: setView = android.widget.PopupWindow$PopupDecorView{60cb454 V.E...... ......I. 0,0-0,0} touchMode=true
12-07 14:58:52.436 24071-24071/com.selecttest V/InputMethodManager: Not IME target window, ignoring
12-07 14:58:52.437 24071-24071/com.selecttest D/ViewRootImpl@1b7e7a7[PopupWindow:55b5866]: dispatchAttachedToWindow
12-07 14:58:52.471 24071-24071/com.selecttest D/ViewRootImpl@1b7e7a7[PopupWindow:55b5866]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[8,166][148,326] result=0x27 surface={isValid=true -1995894784} surfaceGenerationChanged=true
12-07 14:58:52.472 24071-24071/com.selecttest D/ViewRootImpl@1b7e7a7[PopupWindow:55b5866]: mHardwareRenderer.initialize() mSurface={isValid=true -1995894784} hwInitialized=true
12-07 14:58:52.476 24071-24071/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-07 14:58:52.479 24071-24071/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-07 14:58:52.483 24071-24071/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-07 14:58:52.492 24071-24071/com.selecttest W/ResourceType: No type identifier when getting value for resource number 0x03000000
12-07 14:58:52.494 24071-24071/com.selecttest D/AbsListView: in onLayout changed
12-07 14:58:52.495 24071-24071/com.selecttest D/ViewRootImpl@1d32b32[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1024, 768) ci=Rect(0, 24 - 0, 0) vi=Rect(0, 24 - 0, 0) or=2
12-07 14:58:52.549 24071-24071/com.selecttest D/ViewRootImpl@1b7e7a7[PopupWindow:55b5866]: MSG_RESIZED_REPORT: frame=Rect(8, 166 - 148, 326) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2

@weremax
Copy link
Author

weremax commented Dec 7, 2017

This has been an issue for sometime now...this chrome android tablet issue has impacted many such as: ionic, phonegap, selendroid, and most other mobile platforms with webview integrations in relation to the dreaded select field. Of which none of the proposed solutions work.

@weremax
Copy link
Author

weremax commented Dec 8, 2017

Some additional information related to this issue: https://productforums.google.com/forum/#!topic/chrome/Q4Rt6d0C4Qo

and modals are not an option for everyone, especially not in my case.

@stale
Copy link

stale bot commented Feb 6, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 6, 2018
@stale stale bot closed this as completed Feb 13, 2018
@JoseBoga
Copy link

Hello I have the same issue, any solution ? @weremax

@weremax
Copy link
Author

weremax commented Feb 17, 2018

I had to use a very cumbersome workaround nothing in react-native worked because it is at best guess a chrome tablet issue. It is an input facade that worked for me and very drawn out to boot with style selecting and settings on clicks etc...

@JoseBoga
Copy link

thanks @weremax

@SohailZahidGit
Copy link

I have the same issue happening while opening a activity which is created but nothing shown. In below log there is line ThreadedRenderer.create() translucent=true i think its the issue.

I didt make my activity translucent then why logs are saying this?

Note:

04-03 13:51:16.534 7964-10864/com.fayvo D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=CategoryPosts, firebase_previous_id(_pi)=-3646689808886231685, firebase_screen_class(_sc)=PostDetailWithSwipe, firebase_screen_id(_si)=-3646689808886231678}]
04-03 13:51:16.540 7964-7964/com.fayvo D/ViewRootImpl@3662891[PostDetailWithSwipe]: ThreadedRenderer.create() translucent=true
04-03 13:51:16.542 7964-7964/com.fayvo D/InputTransport: Input channel constructed: fd=117
04-03 13:51:16.543 7964-7964/com.fayvo D/ViewRootImpl@3662891[PostDetailWithSwipe]: setView = DecorView@401a3f6[PostDetailWithSwipe] touchMode=true
04-03 13:51:16.546 7964-7964/com.fayvo D/ViewRootImpl@3662891[PostDetailWithSwipe]: dispatchAttachedToWindow
04-03 13:51:16.679 7964-7964/com.fayvo D/ViewRootImpl@3662891[PostDetailWithSwipe]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,0][1440,2560] result=0x27 surface={isValid=true 522298230272} surfaceGenerationChanged=true
    mHardwareRenderer.initialize() mSurface={isValid=true 522298230272} hwInitialized=true

@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants