android - 为 Android > 4.0 Webkit 的焦点禁用文本输入的矩形(橙色边框)

标签 android google-chrome webview webkit android-4.0-ice-cream-sandwich

我正在构建一个带有酷炫搜索输入的网络应用程序。但是,当我单击输入开始输入时,输入框会突出显示一个蓝色边框,这很好,看起来不错,但除此之外,文本输入上还会出现一个带有橙色边框的白色矩形,看起来真的很糟糕。

我已经尝试了几种解决方案,但都没有用。 (CSS 样式解决方案将 alpha 更改为 0 等。)[但如果你能让它们在 android 4.0 和/或更高版本上工作,那么也许我做错了,我会再试一次]

其他人说这些解决方案不适用于较新的 Android 操作系统,这也是我的经验。我个人运行的是 Android 4.0.4。

--- 问题重现 ---

我的 Android 应用程序和 native Android 浏览器 ...

enter image description here

Android 版 Chrome 浏览器 ... [ 运行良好! ]

enter image description here

既然它在 Chrome 中工作,那么它一定是可以修复的。我原以为 Chrome 是开源的,所以我试图找到他们的源代码,以便找到解决方案。 Android Chrome 的源代码不可用,因此它不是开源的。

最佳答案

您是否尝试过在焦点上将 outline 样式设置为 none?你说你尝试过 css 解决方案,但你尝试了什么?

在我看来,它像是一个关于焦点的大纲,非常标准,可以用

outline: none;
box-shadow: none; /* If this is a box shadow - clear it with this */

关于android - 为 Android > 4.0 Webkit 的焦点禁用文本输入的矩形(橙色边框),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12654669/

相关文章:

javascript - Uncaught TypeError : pre, template,textarea,script,style is not iterable

android - 使用带有 flash 的 webview 时屏幕闪烁

android - 在 webview 中播放本地视频

android - Looper 处理程序示例

android - ListFragment OnListItemClick 未被调用

java - 为什么收到新消息时,所有先前消息的时间戳都设置为与新消息相同?

css - 谷歌浏览器自动填充背景颜色变化?

android - 错误 : Unable to resolve dependency for ':react-native-maps@debug/compileClasspath' : Could not resolve androidx. appcompat :appcompat:1. 0.0

javascript - 如何在Chrome浏览器和PNaCl插件之间正确传递JavaScript函数

android - 实现 LayoutAlgorithm.SINGLE_COLUMN 算法?