# Give focus to a dock without having to click on it

**URL:** <https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 18, 2024, 7:00pm UTC](https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072 "2024-04-18T19:00:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 18, 2024, 7:00pm UTC](https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072/1 "2024-04-18T19:00:44Z")

</div>

I would like to give the focus to a dock (top) without having o click on it

The dock top contain a dropdown on its left side. If I click on the dropdown, the list is visible only if I click before on the dock top....

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 18, 2024, 11:31pm UTC](https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072/2 "2024-04-18T23:31:19Z")

</div>

This sounds like a bug instead of a question. Can you provide some more information? Version? Is there anything special about the Dropdown or how its options are determined?

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [April 18, 2024, 11:58pm UTC](https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072/3 "2024-04-18T23:58:42Z")

</div>

I have the same issue, I'm on 8.1.39.

Example, north dock has a dropdown for themes. West deck is used for navigation. If the users does something in the west dock, the only way they can use the dropdown in the north dock is to first click the north dock to get focus, otherwise the dropdown "falls" behind.

Note: for me, this is just a test application, so no big deal, but I could see a need down the road and would be nice to at least have a workaround. I couldn't find a way to grab focus programmatically.

Normal (with focus):  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/f/3fdef8cfe82583e0935aadde9eeb22405ade4b13.png)

Abnormal (no focus):  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/2/f2fb84c2ee92b953ef3b3c8dd6f090d336c205c5.png)

I think this post is similar?

> [@Z-index of docked views changing while in use](https://forum.inductiveautomation.com/t/z-index-of-docked-views-changing-while-in-use/63713):
>
> Hello, I am experimenting with themes and I am facing a slightly annoying issue with docked views. When having two docks in the shared page settings, e.g. a top one and a left one, with priority set for the top one (top-bottom in the perspective properties). It works well, except that the z-index of the docked views seems to change slightly when the left one is open, pushing it over the top one until the top dock is clicked, which once again brings it at an higher z-index. The result is that t…

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 19, 2024, 5:01am UTC](https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072/4 "2024-04-19T05:01:40Z")

</div>

Ignition 8.1.39.  
This is the usecase describe by @jlandwerlen

---

<div class="post-metadata">

**Author:** ![rpavlicek](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rpavlicek/32/55868_2.png) [@rpavlicek](https://forum.inductiveautomation.com/u/rpavlicek)\
**Post date:** [May 15, 2024, 1:56pm UTC](https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072/5 "2024-05-15T13:56:41Z")

</div>

I'm experiencing the same issue as this. If I have a navigational north dock with a left menu onDemand dock. If I initially click on the dropdown with the left dock open, the dropdown options hide behind the menu. A user would have to click on an open part of the top dock to "gain focus" of that view and then for the dropdown options to show on top correctly.

I tried a bunch of different things to see if I could gain focus, but doesn't make a difference. I tried other tricks to add the property "position" or "z-index", also setting the overflow to "visible", but couldn't make those work either.

This has made our navigation quite limited and a stopping point in in finishing out the project.

---

<div class="post-metadata">

**Author:** ![deforder](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@deforder](https://forum.inductiveautomation.com/u/deforder)\
**Post date:** [July 30, 2024, 11:55pm UTC](https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072/6 "2024-07-30T23:55:20Z")

</div>

Got the same problem.  
The dropdown dives under the menu in another dock view  
Version 8.1.42.

Is there any solution, at least temporary?

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [July 31, 2024, 6:40am UTC](https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072/7 "2024-07-31T06:40:51Z")

</div>

I only see this happen when the dropdown opens on top of another dock. The primary view is not affected.

A quick dev tool check shows that docks have a z-index of 11000 by default, which gets changed to 11010 when clicked on.

You can override this with the stylesheet, ie:

```css
.docked-view-top {
	z-index: 11011 !important;
}

```

(you can try and find a better selector, but that's the idea)  
With this, the issue goes away. It might bring its own issues, but for now if you want your dropdown to show, I guess you can either move it somewhere else, or use this.

---

<div class="post-metadata">

**Author:** ![deforder](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@deforder](https://forum.inductiveautomation.com/u/deforder)\
**Post date:** [July 31, 2024, 8:46pm UTC](https://forum.inductiveautomation.com/t/give-focus-to-a-dock-without-having-to-click-on-it/89072/8 "2024-07-31T20:46:03Z")

</div>

It works. Thanks!
