Skip to content

Blur textarea after posting a comment #848

Closed

Description

@hkdobrev

I often post a comment with ⌘+↵ and then try go to the notifications or PR list with a keyboard shortcut - e.g. g,n.

However, the comment field is still focused after posting my comment and I just end up typing gn in the textarea.

I suggest to trigger blur (unfocus) on tne textarea after successful submission so keyboard shortcuts on GitHub work immediately.

I don't think posting subsequent comments is often enough to be a problem.

An alternative approach which I also like is to map Esc to blurring the textarea.

Activity

  1. vjpr commented on Dec 11, 2017

    @vjpr

    I suggest to trigger blur (unfocus) on tne textarea after successful submission so keyboard shortcuts on GitHub work immediately.

    This conflicts with: #858

    An alternative approach which I also like is to map Esc to blurring the textarea.

    This would be much better.

  2. fregante commented on Dec 19, 2017

    @fregante
    Member

    An alternative approach which I also like is to map Esc to blurring the textarea.

    I like this one, but we need to figure out how to do this since Esc is currently mapped to "Cancel inline comment"

    https://github.com/sindresorhus/refined-github/blob/d7768508c3919558daa6b2ccc5a15aa73d081551/source/features/add-keyboard-shortcuts-to-comment-fields.js#L51-L57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions