HTML <select> control disabled in Android We

2019-04-08 18:20发布

I have a very simple Android app that's just a WebView. Everything works fine (complex Javascript etc.). However, all of the HTML select controls seem to be disabled. They display with default values, but nothing happens when I click on them, and they don't get the orange highlight when I arrow through the controls.

Other inputs (text, radios, submit) work fine, so I don't think it's a focus issue.

Configuration:

  • Eclipse IDE
  • SDK Version 8 (2.2)
  • Testing in the Emulator

4条回答
虎瘦雄心在
2楼-- · 2019-04-08 18:57

2 years after the fact, but in case someone pulls this up again:

If it's android 2.3, put   in every empty child element of a fixed position parent. I found that this fixed the problem for me.

查看更多
趁早两清
3楼-- · 2019-04-08 19:03

Same Problem, fixed it by setting position:relative on the li's containing the select fields

查看更多
Animai°情兽
4楼-- · 2019-04-08 19:13

I had the same problem.

In my case I had elements on the page that had the style position:fixed;

Although the bounding boxes of the select element and the fixed positioned elements did NOT overlap, I wasn't able to open the select dialog.

By removing a couple of fixed positioned elements I got it to work. Seems to be a bug in webview.

查看更多
男人必须洒脱
5楼-- · 2019-04-08 19:19

I had the same problem. My problem was fixed by changing overflow:hidden to overflow:visible on a containing element.

查看更多
登录 后发表回答