禁止在重点橙色轮廓亮点 [英] Disable orange outline highlight on focus

查看:137
本文介绍了禁止在重点橙色轮廓亮点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编码使用jQuery,jqTouch和PhoneGap的,并通过持续的问题,当用户使用软键盘上的Go按钮提交表单它产生运行的应用程序。

虽然很容易获得光标用 $('#input_element_id)。重点()移动到相应的表单输入元素,橙色轮廓亮点总是返回到窗体上的最后一个input元素。 (当使用表格的形式提交按钮提交的亮点不露面。)

我需要的是找到一种方法,既可以完全禁用橙色亮点或者使其移动到相同的输入元素光标。

到目前为止,我曾尝试加入以下到我的CSS:

  .class_id:重点{
    概述:无;
}
 

这工作在Chrome浏览器而不是在模拟器上或在我的手机上。我也曾尝试编辑jqTouch theme.css 阅读:

  UL里输入[类型=文本] {
    -webkit抽头高亮颜色:RGBA(0,0,0,0);和
    -webkit对焦环的颜色:RGBA(0,0,0,0);
}
 

使用没有任何影响。 我也曾尝试以下每个增加的的Andr​​oidManifest.xml 文件:

 安卓imeOptions =actionNone
机器人:imeOptions =actionSend | flagNoEnterAction
机器人:imeOptions =actionGo | flagNoEnterAction
 

其中没有

有任何效果。

更新:我已经做了一些更多的故障排除与此,迄今已发现:

  1. outline属性仅适用于Chrome浏览器,而不是在Android浏览器。

  2. -webkit-自来水高亮双色属性确实在Android浏览器其实工作,虽然不是在Chrome。它禁止对焦点以及对挖掘的亮点。

  3. -webkit-对焦环彩属性似乎并没有工作在任何浏览器。

解决方案

尝试:

  -webkit-自来水高亮颜色:RGBA(255,255,255,0);
-webkit抽头高亮颜色:透明; //即Nexus5 / Chrome和Kindle Fire的HD 7''
 

I am coding an app using jQuery, jqTouch and phonegap and have run across a persistent problem which arises when a user submits a form using the Go button on the soft keyboard.

Although it is easy to get the cursor to move to the appropriate form input element by using $('#input_element_id').focus(), the orange outline highlight always returns to the last input element on the form. (The highlight does not show up when the form is submitted using the form submit button.)

What I need is to find a way either to disable the orange highlight completely or else make it move to the same input element as the cursor.

So far, I have tried adding the following to my CSS:

.class_id:focus {
    outline: none;
}

This works in Chrome but not on the emulator or on my phone. I have also tried editing the jqTouch theme.css to read:

ul li input[type="text"] {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); and
    -webkit-focus-ring-color:  rgba(0, 0, 0, 0);
}

With no effect. I have also tried each of the following additions to the AndroidManifest.xml file:

android:imeOptions="actionNone"
android:imeOptions="actionSend|flagNoEnterAction"
android:imeOptions="actionGo|flagNoEnterAction"

None of which have any effect.

Update: I have done some more troubleshooting with this and to date have found:

  1. The outline property works only on Chrome, not on the Android browser.

  2. The -webkit-tap-highlight-color property does in fact work on the Android browser, though not on Chrome. It disables the highlight on focus as well as on tapping.

  3. The -webkit-focus-ring-color property does not seem to work on either browser.

解决方案

Try:

-webkit-tap-highlight-color: rgba(255, 255, 255, 0); 
-webkit-tap-highlight-color: transparent;  // i.e. Nexus5/Chrome and Kindle Fire HD 7''

这篇关于禁止在重点橙色轮廓亮点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆