# When a Wiki Post is edited then have problems maintaining the correct width on mobile devices

**URL:** https://meta.discourse.org/t/when-a-wiki-post-is-edited-then-have-problems-maintaining-the-correct-width-on-mobile-devices/79919
**Category:** UX
**Created:** [February 6, 2018, 4:02pm UTC](https://meta.discourse.org/t/when-a-wiki-post-is-edited-then-have-problems-maintaining-the-correct-width-on-mobile-devices/79919 "2018-02-06T16:02:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [February 6, 2018, 4:02pm UTC](https://meta.discourse.org/t/when-a-wiki-post-is-edited-then-have-problems-maintaining-the-correct-width-on-mobile-devices/79919/1 "2018-02-06T16:02:04Z")

</div>

**Tested using an Huawei P10 Lite and Chrome**

Examples of affected topics:

- [Use Discourse Core Variables in your Theme](https://meta.discourse.org/t/how-to-use-the-current-color-scheme-variables-in-your-custom-sheets/77551)  
produces:

[https://global.discourse-cdn.com/meta/original/3X/0/4/046bb0fcbb8e54c4bcce35e9a7a281027507a54c.mp4](https://global.discourse-cdn.com/meta/original/3X/0/4/046bb0fcbb8e54c4bcce35e9a7a281027507a54c.mp4)

- [https://meta.discourse.org/t/the-discourse-wikipedia-page-is-very-poor/72026/10?u=dax](https://meta.discourse.org/t/the-discourse-wikipedia-page-is-very-poor/72026/10) (code)
- [https://meta.discourse.org/t/draft-recommended-hosting-providers-for-novices/79399](https://meta.discourse.org/t/draft-recommended-hosting-providers-for-novices/79399) (table + quote)
- [Discourse vs. Khoros](https://meta.discourse.org/t/discourse-vs-lithium/71658) (oneboxes + quote)

I tried to edit a wiki topic that **had never been modified** and that was displayed correctly by clicking the green pencil, immediately after the fake change made (I changed a letter) the layout on mobile broke: [https://meta.discourse.org/t/what-is-a-onebox/78060](https://meta.discourse.org/t/what-is-a-onebox/78060)

This topic has the correct layout instead, even if it has just been modified [Contributor Interviews – Jay Pfaffman](https://meta.discourse.org/t/contributor-interviews-jay-pfaffman/77504)

I am able to break the layout by entering at least:

- some code (`[code][/code]` or 4 spaces)
- a onebox
- quotes
- a table

PS. sorry Jay! 😝

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 6, 2018, 4:04pm UTC](https://meta.discourse.org/t/when-a-wiki-post-is-edited-then-have-problems-maintaining-the-correct-width-on-mobile-devices/79919/2 "2018-02-06T16:04:13Z")

</div>

This has got to be some missing CSS rule limiting width of the modal cc @awesomerobot

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [February 6, 2018, 11:17pm UTC](https://meta.discourse.org/t/when-a-wiki-post-is-edited-then-have-problems-maintaining-the-correct-width-on-mobile-devices/79919/3 "2018-02-06T23:17:46Z")

</div>

Pushed some fixes:

[https://github.com/discourse/discourse/commit/900f37e5a9fe714c939b7bbd5cd27ef3942244b0](https://github.com/discourse/discourse/commit/900f37e5a9fe714c939b7bbd5cd27ef3942244b0)

- The modal container/controls shouldn’t overflow anymore on mobile devices, but in some instances the content will (wide tables and code blocks with long unbroken strings). I could force tables and code blocks to break words and wrap, but it feels better to preserve the structure and scroll horizontally.

- I also updated it so the history modal will resize to portrait tablet resolutions, previously we were at a fixed 960px width.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 6, 2018, 11:18pm UTC](https://meta.discourse.org/t/when-a-wiki-post-is-edited-then-have-problems-maintaining-the-correct-width-on-mobile-devices/79919/4 "2018-02-06T23:18:15Z")

</div>


