# Fullscreen composer keyboard shortcut works only once

**URL:** <https://meta.discourse.org/t/fullscreen-composer-keyboard-shortcut-works-only-once/101920>\
**Category:** Bug\
**Tags:** keyboard-shortcuts\
**Created:** [11월 13, 2018, 9:23오전 UTC](https://meta.discourse.org/t/fullscreen-composer-keyboard-shortcut-works-only-once/101920 "2018-11-13T09:23:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)\
**Post date:** [11월 13, 2018, 9:23오전 UTC](https://meta.discourse.org/t/fullscreen-composer-keyboard-shortcut-works-only-once/101920/1 "2018-11-13T09:23:43Z")

</div>

It seems i cannot go to fullscreen by pressing `shift+f11` but only exit the fullscreen. (i have to press the fullscreen button first).

It’s also weird that when the editor is in fullscreen if i keep `shift` pressed then quickly keep pressing `f11` multiple times, the editor goes full ↔ not full _as long as the previous animation was not finished_.

Happens here on meta, on chrome.

---

<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:** [11월 14, 2018, 1:21오전 UTC](https://meta.discourse.org/t/fullscreen-composer-keyboard-shortcut-works-only-once/101920/2 "2018-11-14T01:21:49Z")

</div>

Hmmm I can even get SHIFT F11 to work here either to open or close fullscreen.

Using [this keyboard](https://www.microsoft.com/accessories/en-us/products/keyboards/sculpt-ergonomic-desktop/l5v-00001) on Windows, tested on Chrome and Firefox.

@Johani can you have a look, I wonder if we should pick a different shortcut here.

---

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [11월 14, 2018, 3:18오전 UTC](https://meta.discourse.org/t/fullscreen-composer-keyboard-shortcut-works-only-once/101920/3 "2018-11-14T03:18:50Z")

</div>

The reason this happens is because the composer title steals focus when the composer is opened.

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/composer.hbs#L62](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/composer.hbs#L62)

 ![1136](https://global.discourse-cdn.com/meta/original/3X/2/4/2417cbe367b2b774f2f462d51e7e78a9482e6d21.png)

So when you use the shortcut, you’re using it while the input is focused and that’s why it doesn’t work. You’d need to click somewhere outside to remove the focus from the input. Although slightly less obvious, the composer body text area - if focused - will also interfere with the shortcut.

When you enter full screen mode the title input is removed, when you exit, it gets re-inserted and steals focus again. This is why this occurs

> [@TheBestPessimist](#):
>
> It’s also weird that when the editor is in fullscreen if i keep `shift` pressed then quickly keep pressing `f11` multiple times, the editor goes full \<-\> not full _as long as the previous animation was not finished_ .

Mousetrap has a way to handle this, to add a `mousetrap` class to the markup of those elements, the shortcut would then fire even if the inputs are focused, but so will all the other keyboard shortcuts and it creates a lot more problems than it solves.

> [@sam](#):
>
> I wonder if we should pick a different shortcut here.

Sure, just let me know what works for you.

---

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [3월 25, 2019, 12:50오전 UTC](https://meta.discourse.org/t/fullscreen-composer-keyboard-shortcut-works-only-once/101920/5 "2019-03-25T00:50:56Z")

</div>

This was fixed by @pmusaraj ❤ a while back and I forgot to update here.

[https://github.com/discourse/discourse/pull/6907/files](https://github.com/discourse/discourse/pull/6907/files)

The shortcut should now work regardless of whether or not the input / textarea are focused.

Thanks for reporting the issue @TheBestPessimist 👍

---

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [3월 25, 2019, 12:50오전 UTC](https://meta.discourse.org/t/fullscreen-composer-keyboard-shortcut-works-only-once/101920/6 "2019-03-25T00:50:59Z")

</div>


