question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hitting escape exits full screen

See original GitHub issue

As a person pretty much exclusively using safari in full/split screen mode I find myself constantly exiting fullscreen by accident when using vimari, for instance if I want to return to normal mode after writing a comment like this to hit the submit key from links hint mode.

This can be avoided by preventing default behaviour through an event listener.

Rough example:

function disable_esc_exit(window){
    const ESC_KEY = 27;
    const KEYPRESS_EVENT = "keypress";

    window.addEventListener(KEYPRESS_EVENT, 
        event => event.keyCode === ESC_KEY && event.preventDefault()
    );
}

... 
disable_esc_exit(window);

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

6reactions
paddorcommented, Jan 6, 2021

What’s the status here? This bug makes this extension pretty much useless in fullscreen mode.

3reactions
Hultnercommented, Aug 17, 2018

There’s two cases triggering this behaviour

  1. I accidentally hit Esc to many times or due to muscle memory
  2. I’ve edited a input field, hit Esc to exit insert mode to normal mode. My instinct when writing this comment is to input desired text, hit Esc, enter link target mode, trigger the [Comment]-button.

Both these cases are equally disrupting.

Thanks again for reading and taking my input into consideration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Don't exit full screen when pressing escape in apps like Safari ...
Press ESC to close the modal. Safari is aware that there is a modal window, and doesn't exit full screen. Press ESC again...
Read more >
Exit full screen mode by pressing 'Esc' key on your keyboard
You can exit the Full-Screen Mode by pressing the Esc key on your keyboard. When viewing an activity, click the Full-Screen Mode toolbar ......
Read more >
ESC key not exiting fullscreen for youtub… - Apple Community
My esc key is not exiting fullscreen anymore on any of my browsers including safari and chrome. It wont work on youtube or...
Read more >
Hitting escape exits full screen #110 - televator-apps/vimari
This trigger Safari to exit full screen mode, accompanied with a disruptive animation. In addition if the user ran the window in split...
Read more >
How to exit fullscreen on pressing ESC or by toggling the ...
I'm looking for a solution to exit fullscreen mode on pressing "ESC" or by pressing "Make fullscreen button" again.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found