Search code examples
javascriptandroidiosgoogle-chrometextselection

Disable mobile Chrome 43's "Touch to Search" feature programmatically


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.

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.

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


Solution

  • 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:
      • Anything with an aria-role will not have the touch to search enbabled
      • Anything with a tabindex of -1 or > 0