# Composer 打开时，根据当前视口限制高度

**URL:** https://meta.discourse.org/t/when-composer-opens-limit-height-based-on-current-viewport/94534
**Category:** UX
**Created:** [2018年八月12日 17:13 UTC](https://meta.discourse.org/t/when-composer-opens-limit-height-based-on-current-viewport/94534 "2018-08-12T17:13:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2018年八月12日 17:13 UTC](https://meta.discourse.org/t/when-composer-opens-limit-height-based-on-current-viewport/94534/1 "2018-08-12T17:13:39Z")

</div>

I think we do this correctly now, more or less: [Remember composer height](https://meta.discourse.org/t/remember-composer-height/74668)

But, I think I just discovered an unintended consequence that is problematic in certain conditions.

1. Open composer
2. Increase the height to the full height of the the viewport
3. Close composer
4. Open composer again  
… the composer is the same height as in step 2 👍
5. Close composer
6. Make browser window smaller (decrease the height)
7. Open composer again  
… the top of the composer is not visible, and so it cannot be resized 👎  
… this is more problematic when you’ve changed machines, and you can’t make your browser height any larger.

 ![composer-height](https://global.discourse-cdn.com/meta/original/3X/f/a/fa1ec14b61fcbd614959fc00c3e232021f49c745.gif)

(As a workaround, you can zoom out in your browser and then resize the composer…)

---

<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: [2018年八月12日 23:45 UTC](https://meta.discourse.org/t/when-composer-opens-limit-height-based-on-current-viewport/94534/2 "2018-08-12T23:45:46Z")

</div>

@misaka4e21 can you have a look at this?

---

<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: [2018年八月13日 04:15 UTC](https://meta.discourse.org/t/when-composer-opens-limit-height-based-on-current-viewport/94534/3 "2018-08-13T04:15:45Z")

</div>

This might be an easy CSS fix… I think something like `max-height: calc(100vh - 65px);` would do it.
