No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Tooltips don't show on disabled buttons

    Framework
    9
    15
    4124
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mbouclas last edited by

      when a button has the disabled property applied the tooltip doesn’t show at all

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        They will in v0.14, because you will be using a component (QBtn) instead of a native HTML element and this means total control over the buttons behavior, avoiding browsers handling state (like “disabled”).

        1 Reply Last reply Reply Quote 1
        • M
          mbouclas last edited by

          thanks for that

          1 Reply Last reply Reply Quote 0
          • marcelo
            marcelo last edited by

            Still not working (v0.15.9)…

            1 Reply Last reply Reply Quote 0
            • J
              joeyezekiel last edited by

              Is there a solution to this problem @rstoenescu ?

              1 Reply Last reply Reply Quote 0
              • s.molinari
                s.molinari last edited by

                Where does it not work @joeyezekiel ?

                https://jsfiddle.net/smolinari/30f2hdvn/1/

                Scott

                1 Reply Last reply Reply Quote 0
                • J
                  jasonl last edited by

                  @s-molinari Bit of a stale post but I looked at your code and it works because you use the “disable” directive, not “disabled” like the OP. Where does the “disable” directive come from? I’ve looked in the Quasar and Vue docs and don’t see it anywhere. It works, just curious where it’s coming from!

                  Jason

                  1 Reply Last reply Reply Quote 0
                  • metalsadman
                    metalsadman last edited by metalsadman

                    @jasonl disabled is native, while disable is a quasar prop use to put a quasar component in a disabled state. v.017 https://quasar-framework.org/components/button.html#Vue-Properties and v1 https://v1.quasar-framework.org/vue-components/button#QBtn-API

                    1 Reply Last reply Reply Quote 1
                    • S
                      Sweetyy last edited by

                      Hi !

                      I just upgrading to Quasar v1.2.4 and the tooltip doesn’t show anymore when a q-btn is disable. Here is my code :

                      <q-btn dense no-caps label="See" @click="seeForm()" disable>
                         <q-tooltip>Loading...</q-tooltip>
                      </q-btn>
                      

                      Any idea ?

                      1 Reply Last reply Reply Quote 0
                      • s.molinari
                        s.molinari last edited by

                        Wrap the button in a div.

                        https://codepen.io/smolinari/pen/BaaRMyE?editors=1010

                        Also, it’s better if you start a new thread and not reactivate old ones. Thanks!

                        Scott

                        1 Reply Last reply Reply Quote 1
                        • S
                          Sweetyy last edited by

                          @s-molinari thank you for the answer and sorry for that !

                          1 Reply Last reply Reply Quote 0
                          • rubs
                            rubs last edited by rubs

                            A <div>or <span> works. But I still think @rstoenescu is right: “a component (QBtn) … means total control over the buttons behavior”. May I suggest reconsidering it for the future? Thanks.

                            1 Reply Last reply Reply Quote 0
                            • s.molinari
                              s.molinari last edited by

                              @rubs - Considering what for the future?

                              Scott

                              1 Reply Last reply Reply Quote 0
                              • rubs
                                rubs last edited by rubs

                                Sorry, I thought the thread title made the point clear. I believe that tooltips may be even more important when a QBtn is disabled (to inform users the reason why it is disabled, for example). So I think tooltips should be enabled whether QBtns are disabled or not. It should be left to the programmers to decide if they want it to hide tooltips (e.g. using v-if). Wrapping a control in a div or span works, but it’s more of a trick than a solution IMO. Hope it’s clearer now.

                                1 Reply Last reply Reply Quote 2
                                • s.molinari
                                  s.molinari last edited by

                                  If you wrap Qtooltip with QBtn, QBtn has no clue it’s there. Wrapping them both with a div takes it out of the QBtn, so the tooltip can work as it should. It’s not a trick, it is the solution.

                                  Scott

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post