# Focusing on input in modal on mobiles scrolls the page up and makes the modal invisible

**URL:** <https://meta.discourse.org/t/focusing-on-input-in-modal-on-mobiles-scrolls-the-page-up-and-makes-the-modal-invisible/60699>\
**Category:** UX\
**Created:** [2017 年 4 月 10 日午前 3:57 UTC](https://meta.discourse.org/t/focusing-on-input-in-modal-on-mobiles-scrolls-the-page-up-and-makes-the-modal-invisible/60699 "2017-04-10T03:57:15Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [2017 年 4 月 10 日午前 3:57 UTC](https://meta.discourse.org/t/focusing-on-input-in-modal-on-mobiles-scrolls-the-page-up-and-makes-the-modal-invisible/60699/1 "2017-04-10T03:57:15Z")

</div>

I’ve been able to reproduce this issue for a long time now. To me it looks like a **UX bug**.

**The impact** is that it is hardly possible to use modal dialogs in mobile mode, i.e.:

- split topics, both moving messagins to an existing or to a new topic
- flag topics with “other” reason and a personal note
- some other actions

In all these cases, here is **what happens**.

1. A modal dialog opens. For example, after I select a few messages in the middle of a long topic and is about to split them into an existing topic

2. I touch the input to enter the search keyword. The dialog disappears and I can only see the gray background, which is an overlay layer behind the modal and on top of the website.

3. Because the layout is transparent, I can notice how the page got scrolled behind the overlay.

4. In order for the dialog to appear again, I have to click on the “Done” button, which is part of my iPhone keyboard. The keyboard then gets hidden and I can see the dialog again, but the input is unfocused.

5. I touch the input to let it gain focus again. But then 2, 3 and 4 repeats until the topic scrolls up to the very top, so that no more scrolling is possible. The longer the topic, the more times I have to focus / blur the input.

6. Finally, when there is no more content to scroll to, the dialog will not disappear anymore, and I can do what I intended to.

This makes moderation hardly possible from mobile.

---

_[View the full topic](https://meta.discourse.org/t/focusing-on-input-in-modal-on-mobiles-scrolls-the-page-up-and-makes-the-modal-invisible/60699)._
