On a button, I have this dynamic attribute Tooltip:
How can I make this tooltip go away after a few seconds? Right now, it seems to stay there indefinitely until I click the button again…
On a button, I have this dynamic attribute Tooltip:
How can I make this tooltip go away after a few seconds? Right now, it seems to stay there indefinitely until I click the button again…
I think it’s best to use on hover. I personally have all kinds of UI issues when using on click especially in a table and you can have many open tooltips.
How about triggering a scheduled event that has a trigger time of a few seconds? I have no idea if there are methods for closing though.
Can’t hover on a tablet Thanks though! I’m trying to replicate this tooltip once the user clicks the button to copy to clipboard:
Interesting idea! Although you may be right there may not be a readily-available method for closing the tooltip
Good point about tablets😏
What about popping up a small modal on the click event instead of the popup. That way you could use ken’s idea of a timer and close the modal on delay
I ended “solving” this problem by replacing the button’s text and setting it to “disabled” upon click, and after 2 seconds it goes back to normal. I got rid of the tooltip
btn_clicked
to store a boolean saying if the button was clicked or not (false by default)dmx-text="btn_clicked.value==true ? 'Clicked' : 'Click me'"
dmx-bind:disabled="btn_clicked.value==true"