停用移动Chrome浏览器43的“触摸搜索"功能以编程方式进行功能 [英] Disable mobile Chrome 43's "Touch to Search" feature programmatically

查看:141
本文介绍了停用移动Chrome浏览器43的“触摸搜索"功能以编程方式进行功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Android设备上的Chrome 43中选择文本时,会出现触摸搜索"弹出窗口.我们目前正在为网站上的功能使用文本选择功能,而这项新的Chrome功能会干扰我们的某些用户界面.

When I select text in Chrome 43 on my Android device I get the "Touch to Search" popup. We're currently using text selection for a feature on our site and this new Chrome feature interferes with some of our UI.

从长远来看,我们将开发新的UI/UX与该功能并排使用,但是在此期间,我们希望在Web应用程序中将其禁用.

In the long run, we'll be working out new UI/UX to work side-by-side with this feature, but in the interim, we want to disable it on our web app.

是否可以添加某种元标记或JavaScript来将其关闭?有谁知道这是否当前可行?

Is there some sort of meta tag or JavaScript we can add to turn this off? Does anyone know if this is currently possible?

推荐答案

可以通过多种方式进行操作.用户可以按照PaulI的建议将其关闭,并可以对其进行控制.

This can be manipulated in a number of ways. The user can turn it off in flags as PaulI suggested, and you can control it.

开发者控件,目前有几个选项,但是基本摘要是,如果我们认为它是用户可交互的元素,则将不会启用它:

Developer control, right now there are a couple of options but the basic summary is if we think it is an user interactable element then it won't be enabled:

  • CSS:-webkit-user-select: none;
  • HTML:
    • 带有aria-role的任何内容都无法轻松搜索到
    • tabindex为-1或> 0的任何内容
    • CSS: -webkit-user-select: none;
    • HTML:
      • Anything with an aria-role will not have the touch to search enbabled
      • Anything with a tabindex of -1 or > 0

      这篇关于停用移动Chrome浏览器43的“触摸搜索"功能以编程方式进行功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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