Forum Discussion
Visited state still shows hover effect – how to fix?
Hi all,
I have a button with three built-in states: Normal, Hover, and Visited.
The issue: after clicking the button (so it's in Visited state), when I hover over it again, the Hover effect still appears.
I expected the button to remain visually in its Visited state, without reacting to hover anymore.
There are no custom triggers, and the button is on the base layer.
Is this normal behavior, or is there a fix?
Thanks!
3 Replies
- JudyNolletSuper Hero
That is typical behavior. A Hover state will always show when the user mouses over the object. You need to design your states accordingly.
- MaryT_CollinsCommunity Member
If you want to prevent the user from clicking on the button again you should add a trigger to change it to disabled state after clicking, this should also disable the hover state.
- NedimCommunity Member
As Judy mentioned, this is typical behavior, and there’s nothing that needs fixing here. However, you can override this behavior by simply creating an additional trigger:
Example:
In this basic setup, note that the Hover state initially appears as a light blue color, while the Visited state is green. When we click a button, we see that the Hover state changes to a light green color, which is inherited and adjusted from the Visited state. What we don't see, however, is that Storyline, by default, creates many other states that are not visible or accessible to us. One of these states is simply a combination or mix of other states. For example: _default_Visited, _default_Visited_Disabled, _default_Down_Visited, _default_Hover_Visited, _default_Hover_Visited_Disabled, and so on. And this is exactly what we're seeing here. When we click a button, two states are applied at the same time: _default_Hover_Visited and _default_Visited.
Now, it's up to you whether you want to override this default behavior. It’s certainly possible to do so.