# Focus element state ignored when hovered over?

**URL:** <https://forum.inductiveautomation.com/t/focus-element-state-ignored-when-hovered-over/67810>\
**Category:** Ignition\
**Created:** [December 19, 2022, 10:15pm UTC](https://forum.inductiveautomation.com/t/focus-element-state-ignored-when-hovered-over/67810 "2022-12-19T22:15:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samuel\_Weston](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Samuel\_Weston](https://forum.inductiveautomation.com/u/Samuel_Weston)\
**Post date:** [December 19, 2022, 10:15pm UTC](https://forum.inductiveautomation.com/t/focus-element-state-ignored-when-hovered-over/67810/1 "2022-12-19T22:15:34Z")

</div>

So I'm seeing this weird behavior where I have a button with two styles classes applied, one gives button formatting including text color when hovered over. The other is a generic focus style class that is applied to interactive components that applies a box shadow when the component is in focus.

The strange thing is that if the button is in focus and I hover over it, my focus style isn't applied, but the default focus style (the blue ring) is.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b6b499752afa9de74d9079ce7ec5898f69e23ef2.png)

How come the element state 'focus' is appearing differently to the default focus formatting.

---

<div class="post-metadata">

**Author:** ![Patrick\_Chanthilack](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/patrick_chanthilack/32/42479_2.png) [@Patrick\_Chanthilack](https://forum.inductiveautomation.com/u/Patrick_Chanthilack)\
**Post date:** [January 9, 2023, 11:34pm UTC](https://forum.inductiveautomation.com/t/focus-element-state-ignored-when-hovered-over/67810/2 "2023-01-09T23:34:02Z")

</div>

Hello Samuel\_Weston,

I tried replicating your problem with the given information. I was not able to reproduce the issue you are seeing and would like to help you further.

Would it be possible to send over your configured style classes?  
I want to know how you are setting focus on your checkbox component. Is the focus being set when you are hovering over the component?

---

<div class="post-metadata">

**Author:** ![Samuel\_Weston](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Samuel\_Weston](https://forum.inductiveautomation.com/u/Samuel_Weston)\
**Post date:** [January 12, 2023, 2:26am UTC](https://forum.inductiveautomation.com/t/focus-element-state-ignored-when-hovered-over/67810/3 "2023-01-12T02:26:53Z")

</div>

I have two style classes applied to the button, the first is the button class that sets the icon color dark by default and light when the element state = hover. The other style class is the focus ring, it applies a box-shadow to the button when the element state = focus.

I don't want the focus ring applied whenever we hover over the component, just when the element is in focus. Do the styles only apply one element state at a time? I could see this being an issue since a state like, checked and hover for instance could often occur at the same time.  
[CTech\_Resource\_2023-01-12\_1325.zip](https://forum.inductiveautomation.com/uploads/short-url/3VG3JSShPTbtSVJX1utd1fKWf7u.zip) (2.1 KB)

---

<div class="post-metadata">

**Author:** ![Patrick\_Chanthilack](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/patrick_chanthilack/32/42479_2.png) [@Patrick\_Chanthilack](https://forum.inductiveautomation.com/u/Patrick_Chanthilack)\
**Post date:** [January 12, 2023, 9:54pm UTC](https://forum.inductiveautomation.com/t/focus-element-state-ignored-when-hovered-over/67810/4 "2023-01-12T21:54:26Z")

</div>

Hello Samuel\_Weston,

Taking a look at your style classes in my environment, I was not able to replicate the checkbox styles after applying the provided style classes. Would it be possible to provide me with a full project export where the behavior is happening? Also, what is the Ignition version you are working with?

I suggest opening up a support ticket so we can help you get your style classes sorted for the checkbox. You can contact our support division by clicking on the link below.  
[https://support.inductiveautomation.com/hc/en-us](https://support.inductiveautomation.com/hc/en-us)

---

<div class="post-metadata">

**Author:** ![Samuel\_Weston](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Samuel\_Weston](https://forum.inductiveautomation.com/u/Samuel_Weston)\
**Post date:** [January 13, 2023, 2:27am UTC](https://forum.inductiveautomation.com/t/focus-element-state-ignored-when-hovered-over/67810/5 "2023-01-13T02:27:13Z")

</div>

Thanks Patrick, unfortunately I can't export the full project due to company policy, I'll consider opening a support ticket.

---

<div class="post-metadata">

**Author:** ![Samuel\_Weston](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Samuel\_Weston](https://forum.inductiveautomation.com/u/Samuel_Weston)\
**Post date:** [January 13, 2023, 2:57am UTC](https://forum.inductiveautomation.com/t/focus-element-state-ignored-when-hovered-over/67810/6 "2023-01-13T02:57:59Z")

</div>

Just realised that it's probably not styling correctly because it's pulling the colors from my custom theme, I'll submit a new upload on monday
