# Iframe integration, steals focus in random moment :(

**URL:** <https://forums.rocket.chat/t/iframe-integration-steals-focus-in-random-moment/585>\
**Category:** Community Support\
**Created:** [April 16, 2018, 4:38pm UTC](https://forums.rocket.chat/t/iframe-integration-steals-focus-in-random-moment/585 "2018-04-16T16:38:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eelon](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@Eelon](https://forums.rocket.chat/u/Eelon)\
**Post date:** [April 16, 2018, 4:38pm UTC](https://forums.rocket.chat/t/iframe-integration-steals-focus-in-random-moment/585/1 "2018-04-16T16:38:41Z")

</div>

Hi!  
I’ve finished doing full Rocket.chat integration with my site but I have one big problem. Rocket.chat steals cursor focus in random moments.  
I thought the problem is the “autofocus” setting in the message field’s textarea.

```
  <textarea autofocus name = "msg" maxlength = "{{maxMessageLength}}" placeholder = "{{_ 'Message'}}" rows = "1" class = "rc-message-box__textarea js-input-message autogrow-short "> </ textarea>

```

I removed it using “user scripts” but it did not work.  
What can I do to fix this problem? Now you can not use my site correctly because often the focus moves to rocket.chat (this happens at random moments, not necessarily when I get a notification)

Thanks for the help and creating an amazing chat!

---

<div class="post-metadata">

**Author:** ![kjordan2001](https://avatars.discourse-cdn.com/v4/letter/k/dbc845/32.png) [@kjordan2001](https://forums.rocket.chat/u/kjordan2001)\
**Post date:** [May 22, 2018, 4:43pm UTC](https://forums.rocket.chat/t/iframe-integration-steals-focus-in-random-moment/585/2 "2018-05-22T16:43:21Z")

</div>

I have the same issue. It will randomly grab focus while in an iframe.

---

<div class="post-metadata">

**Author:** ![aaron.ogle](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/aaron.ogle/32/15_2.png) [@aaron.ogle](https://forums.rocket.chat/u/aaron.ogle)\
**Post date:** [May 31, 2018, 6:44pm UTC](https://forums.rocket.chat/t/iframe-integration-steals-focus-in-random-moment/585/3 "2018-05-31T18:44:59Z")

</div>

Can you narrow it down to any specific thing happening?
