What is the best way to turn off Safari's Live Text feature on my website?

I'm currently developing a Vue application and I have a logo in the navbar that, when clicked, should redirect users to the home page. The logo is an .svg file representing the site's name which consists of two lines. For example, if the website is called HelloWorld.com, the logo might look something like this:

hello

world.com

In Safari, the Live Text feature displays and adds a layer on top of the logo which can unintentionally direct users to world.com instead of the intended action. This affects the user experience negatively.

Is there a way to disable this behavior using Vue, HTML, or CSS?

I've already tried adding the following attributes to my img tag:

<img
@click="goToHome()" 
class="img-logo-navbar" 
src="/imgs/logo-RCN-black.svg"
style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;-o-user-select:none; -webkit-touch-callout: none;" 
unselectable="on"
onselectstart="return false;"
onmousedown="return false;"
/>

Answer №1

After implementing this code snippet, the issue was resolved for me. It appears to address the same concerns that you've previously attempted to fix, suggesting that Safari may have introduced a coding update that now supports -webkit-user-select.

#myContainer img {
  // Prevent text selection in Safari Live Text
  -webkit-user-select: none !important;
  cursor: default;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I'm having trouble with my inline list breaking when I try to add something to it. How can I fix this

I'm experiencing an issue where moving my mouse over any of the li's causes them to go out of place. How can I resolve this issue? Here is a demo: https://jsfiddle.net/z970pg6n/ ul { list-style: none; display: block; padding: 0; margi ...

Having trouble pulling data from the MySQL database

Hello, I am currently working on implementing the html dropdown's onchange event with ajax. In my code, I am trying to retrieve the address column value when the dropdown is changed. However, it seems like it's not functioning properly. Can any ...

Center the panel on the page and decrease its width using Bootstrap

I recently incorporated a Bootstrap panel above a search results table - my first experience working with Panels. This panel contains a form with a select menu, allowing users to filter the list of search results based on their selections. Currently, the ...

What's the most effective method for incorporating Vue.js into a .NET Core (2.1) project?

When it comes to incorporating Vue.js into a .NET Core (2.1) project using Visual Studio 2017, there are several options available: You can use Vue CDN. More information at this link. Another option is to utilize libman and add the Vue.js library. Learn ...

Tips for utilizing string functions to sanitize array variables

I have a PHP code snippet for an HTML form: if(isset($_POST['job_title'])){ foreach($_POST['job_title'] as $selected) { $job_title[] = $selected ; } $job_title = json_encode($job_title); $job_title = clean_string($job_titl ...

What is the reason behind adding an extra block in overlapping P tags?

I've encountered a puzzling situation in my code. I have two P tags with borders applied to them, leading me to believe that there should be two light blue blocks displayed. However, upon running the code, I am seeing three blocks instead of the expec ...

IE11 alternative for the CSS property "unset"

I have a div fixed to a specific location on my webpage using the following CSS properties: width: 320px; height: 160px; position: fixed; right: 15px; bottom: 15px; top: unset; z-index: -1; While the div displays correctly in other browsers, in Internet ...

Creating a function for loading dynamic content in XSLT can be achieved by following these steps

When I call the function collapseandexpand() for static elements only, it does not work. Now, how can I create the same function to handle dynamic content in xslt? Javascript Code: <script language="javascript" type="text/javascript> <xsl:text&g ...

Help with HTML: Can't get image to align to the top :(

I'm having difficulty getting this image to align with the top of the browser window. Despite trying various methods, including setting padding to 0 and simplifying the code, I can't seem to eliminate the unwanted padding above the image. Any sug ...

Issue with footer display while utilizing Bootstrap's cover template

When I utilize the Bootstrap cover template, I encounter an issue where if I resize the window to a smaller level or include enough text to require scrolling, the footer background color turns into a solid color. This is also visible in the template I am u ...

Tips on organizing columns in Vue when sorting is needed for computed values

I have come across various resources for sorting data that is contained within an array, but I am unable to locate any information on how to sort dynamically generated data. <table> <thead> <tr> <th>Program</th& ...

The registration password box is filled in automatically

Recently, I noticed a strange issue on my homepage. The left side is for "registering a new account" while the right side is for "logging into an existing account." Everything was working fine until I set a password ("12345") for my root account in phpmy ...

Extract the color of an individual character

There is a code snippet in JavaScript using p5.js that functions as a video filter: const density = ' .:░▒▓█' //const density = ' .tiITesgESG' //let geist; let video let asciiDiv let playing = false let ...

``What is the best approach for specifying property types when passing props to grandchildren within a Vue.js component hierarchy

I have a Vue component named foo embedded in my HTML, and I am passing a parameter to it as shown below: <foo some="Some String"></foo> Within the foo component, I define the property type and default value in the following manner: export d ...

Saving modified input data for submission using Vue

Objective: The main goal is to have a form interface loaded with an object's current data for editing. This allows the user to open a modal with the form already filled out with the existing information, giving them the option to either edit it or lea ...

Troubleshooting problems with dynamic imported asset URLs in Vue and Vitest snapshot snapshots

After migrating my project from Vue-CLI & Jest to Vite & Vitest, I encountered a problem when trying to run tests through Jenkins. It seems that some snapshot images are failing to match due to discrepancies in asset paths. Expected : src="file:///C: ...

Issue with populating textbox using form button in Internet Explorer

My button has an OnClick event that uses Javascript to populate two wide textboxes with selected options from multiple select boxes. While everything works perfectly in Firefox and Chrome, clicking the button in Internet Explorer does not produce any resu ...

Concealing input cells with nbconvert: A how-to guide

In my Jupyter notebook, I have two cells - one defining a function and the other executing it (with a simplified function provided for now). Currently, the function includes a bash command to convert the notebook to an HTML file using nbconvert: Current ve ...

Having an overflow-x set to scroll causes the div's beginning to be truncated

Check out my stackblitz demo here: https://stackblitz.com/edit/angular-ftv8ez I've encountered an issue with a container div that has a fixed width of 300px. Inside the container, there are box divs also set to a fixed width of 300px. The container ...

Tips and tricks for showing a loading gif using the Vue 3 composition api

I just started learning about vue and I'm trying to incorporate a loading gif while waiting for the endpoint to return. I attempted to use watchEffect, but I'm having trouble understanding it. Can someone please clarify if this is the correct ap ...