# Prevent dashboard in iframe from getting focus

**URL:** <https://discuss.elastic.co/t/prevent-dashboard-in-iframe-from-getting-focus/162320>\
**Category:** Kibana\
**Created:** [December 28, 2018, 8:53am UTC](https://discuss.elastic.co/t/prevent-dashboard-in-iframe-from-getting-focus/162320 "2018-12-28T08:53:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvanzoest](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jvanzoest](https://discuss.elastic.co/u/jvanzoest)\
**Post date:** [December 28, 2018, 8:53am UTC](https://discuss.elastic.co/t/prevent-dashboard-in-iframe-from-getting-focus/162320/1 "2018-12-28T08:53:22Z")

</div>

I've created a Kibana dashboard which I want to embed in an iframe on a webpage. The problem I'm facing is that once the Kibana dashboard is fully loaded, the iframe is getting focus. And because the iframe is located at the bottom of the page, the page suddenly scrolls down. I want to prevent this automatic scroll and leave it up to the user to scroll through the webpage.

I think the scroll is happening either because of the fragment in the dashboard url (.../app/kibana **#** /dashboard/...), or because of some Javascript which is triggered by Kibana.

---

<div class="post-metadata">

**Author:** ![jvanzoest](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jvanzoest](https://discuss.elastic.co/u/jvanzoest)\
**Post date:** [January 15, 2019, 8:09am UTC](https://discuss.elastic.co/t/prevent-dashboard-in-iframe-from-getting-focus/162320/2 "2019-01-15T08:09:14Z")

</div>

Does anyone know how to prevent my page from scrolling to the Kibana dashboard in an iframe?

I did some more testing, and I don't think it's related to the fragment in the url. When I use [https://en.wikipedia.org/wiki/Fragment\_identifier#Examples](https://en.wikipedia.org/wiki/Fragment_identifier#Examples) as url in my iframe, the page doesn't scroll to the iframe automatically. So I guess there must be some javascript code which forces Kibana to get focus..

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 12, 2019, 8:09am UTC](https://discuss.elastic.co/t/prevent-dashboard-in-iframe-from-getting-focus/162320/3 "2019-02-12T08:09:15Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
