Having trouble with Vuetify's v-tooltip responsiveness on different breakpoints?

I am encountering an issue that I cannot seem to resolve. I am unsure if this is a Vue/Vuetify bug or if the error lies on my end.

Here is what I am trying to achieve: Display a tooltip only on small screen sizes and lower, regardless of the initial screen size at page load.

The code works as expected when the page is loaded at a small screen size and responsively adjusts (enlarge screen size to medium and higher, then reduce back to small). However, the tooltip does not show and is unresponsive when the page is loaded at medium screen size or higher and then reduced to small.

<template>
  <v-container fluid>
    <v-row>
      <v-col cols="auto" align="center">
        <v-tooltip right :disabled="$vuetify.breakpoint.mdAndUp">
          <template v-slot:activator="{ on }">
            <v-icon color="success" v-on="on">mdi-check</v-icon>
          </template>
          <span>sm screen size!</span>
        </v-tooltip>

        <div class="hidden-sm-and-down">md screen size!</div>
      </v-col>
    </v-row>
  </v-container>
</template>


<script>
  export default {
    data () {
      return {

      }
    },
  }
</script>

Any assistance would be greatly appreciated. Thank you! Meffesino

Answer №1

A while back, I encountered a similar issue! It seems that the v-on="on" directive doesn't always play nice with v-icon. However, I discovered that placing your v-icon inside another component like v-card solves the problem! Give this a try:

<v-col cols="auto" align="center">
        <v-tooltip right :disabled="$vuetify.breakpoint.mdAndUp">
          <template v-slot:activator="{ on }">

            <v-card flat v-on="on">
              <v-icon color="success">mdi-check</v-icon>
            </v-card>
            
          </template>
          <span>sm screen size</span>
        </v-tooltip>

        <div class="hidden-sm-and-down">md screen size!</div>
      </v-col>

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

Connection between mapStateToProps and mapActionsToProps failing to trigger in react component

I am facing an issue with my component (SearchFilter.js) where the connect method is not triggering mapStateToProps and mapActionsToProps on export. The problem is that mapStateToProps is not firing at all -- no props (neither state nor actions) are showi ...

Enhancing nested mongoose arrays by a particular value for updates

In my mongoose schema, I have an array that contains items and another array. var mongoose = require('mongoose'); var Schema = mongoose.Schema; var CompanySchema = new Schema({ dateCreated: { type: Date, default: Date.now }, ownerId: { typ ...

Colorful D3.js heatmap display

Hello, I am currently working on incorporating a color scale into my heat map using the d3.schemeRdYlBu color scheme. However, I am facing challenges in getting it to work properly as it only displays black at the moment. While I have also implemented a ...

Execute an AJAX request in JavaScript without using string concatenation

On my webpage, users input code in a programming language which can be over 2000 characters long and include any characters. When they press the send button, the code is sent to a server-side script file using JavaScript AJAX. Currently, I am using the fo ...

Stop jQuery from adding duplicate values to a table

When I make an AJAX call using jQuery and PHP to receive JSON response, I am encountering a problem with duplicate values. The code is functioning correctly, but when selecting an option from the drop-down list, duplicate entries appear. The scenario invol ...

Leveraging jQuery within a webpack module shared across multiple components, located outside the webpack root directory

When working with multiple layouts that rely on shared typescript files, it is important to ensure these files are accessible across different layouts using webpack. While attempting to include jquery in my ajax.ts, I encountered the following error: ERR ...

What are the steps to create a unique popup div effect with jQuery?

Upon clicking the icon on this page, a mysterious div appears with information. I'm completely baffled by how they achieved this cool effect using css/jQuery tools. Can anyone shed some light on the mechanism behind this? ...

Remove the most recently played sound from an array of sound using Vue.js

I've been trying to figure out how to randomize the sounds that play when a button is clicked, but I also want to avoid repeating the last played sound. It just doesn't sound right if the same sound plays repeatedly in quick succession. I'm ...

Challenges with browsing navigation in Selenium WebDriver

Recently, I began my journey of learning selenium WebDriver. In an attempt to automate the task of logging into an account using the Firefox browser, I encountered a discrepancy. Manually opening the browser and clicking on the login link from the homepag ...

Tips for incorporating Emoji into a messaging platform similar to SendBird (non-native, web-based application)

Hey everyone! I'm currently working on a project that involves integrating the "SendBird" messaging service. I've successfully implemented all the basic functions, but now I want to incorporate Emoji for better user experience. I'm feeling a ...

"Integration error: specified token_name parameters are invalid." FORTPAY INTEGRATION

I have been following the instructions provided by payfort in their email and referring to the Merchant Page 2.0 documentation for integration with nodejs. Despite sending all the necessary parameters in the request body, I encountered an issue where the T ...

Easy steps to automatically disable a checkbox once the expiration date has been reached

I have this PHP code that retrieves values from my database. I want to prevent users from selecting or modifying items with expired dates. Could you assist me with this? The code below currently displays 'Expired' and 'Not Expired' on ...

Choose the radio button by clicking using jQuery

I am attempting to use jQuery to select a radio button on click. Despite multiple attempts, I have been unsuccessful so far. Here is my current code: JS $(document).ready(function() { $("#payment").click(function(event) { event.preventDefault() ...

In the context of Nuxt 3 / Vue, reversing an array within a v-for loop can lead to certain properties being wrongly linked to specific

In my simple component, I have a list of articles with properties such as name, number, link, and publishedDate displayed in order: <script setup> const props = defineProps({ items: { type: Object, required: true }, }) </sc ...

Order a set of date strings in an array using JavaScript

Despite my attempts with underscorejs, I found that the min and max methods cannot handle strings as they return infinite. Is there a way around this limitation? Here is a sample array: dateData = ["26/06/2016", "04/06/2016", "13/05/2016", "20/07/2016"] ...

Directive not working on Mozilla Firefox

Currently, I have a directive set up to display an image as a background image. This works perfectly fine in Chrome and Safari, but for some reason, it doesn't seem to be functioning properly in Firefox as the background images are not showing up. Aft ...

How can state be shared between sibling components in React?

As someone who is relatively new to React, I am seeking guidance on the proper method of passing states between components. While I did come across a similar inquiry on Stack Overflow, I would appreciate if someone could provide a specific solution for my ...

Transfer information from a server to a client using the fetch API in pure JavaScript

Hey there, I've been working on a mini app that sends a fetch request to the backend and expects some information in return when a button is clicked. However, I'm facing an issue where the fetch call seems successful with a 200 status, but the d ...

A guide on passing ObjectID using Ajax to the backend in Node.js

I am trying to create a delete button using font-end code (HTML, Javascript) but I am facing an issue with sending ObjectID via ajax var retName = $(this).data("row-id"); $.ajax({ type: "POST", url: "/delete", data: ...

Unexpected issue on AngularJS application

Encountering issues with incorporating a controller into my page - each time I add it to a DOM element, an error is thrown. Here's the structure of my HTML page: <html data-ng-app="sportsStore"> <head> <title>Sports Sto ...