sindresorhus/refined-github

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Focus the topmost comment field in `quick-mention` #3664

Geeyun-JY3 posted onGitHub

<!-- 1. Make sure your requested feature makes sense for Refined GitHub: https://github.com/sindresorhus/refined-github/issues/2960 2. Include a full URL where the feature should appear. -->

When user is editing a comment and the comment field of that comment is focused, click the quick-mention button then insert the @mention to where the cursor is, instead of the bottom comment field. When the comment field of that comment isn't focused, just do what this feature does now.

If this change is implemented, the tooltip should also be changed (not in a new comment). URL: any issue and PR page, e.g. #3664


Clicking on the quick-mention button would immediately make the text field you are on loose focus. So there is no way for us to know which text field on the page we have to go back to and insert the username as a mention.

I know that the auto-suggest feature of GitHub is not the best in the world, but that's the best thing you can get for quickly searching instead of scrolling around a bit and clicking on the quick-mention button.

posted by notlmn over 4 years ago

GitHub does something similar when pressing the <kbd>r</kbd> key. From what I see, they will simply input the text in the first open textarea, regardless of focus.

However it's buggy on PR reviews because they enter the text in the comment you're editing but then they focus the new comment field.


We could try something similar:

  1. Find the closest discussion (it could be a review thread or the whole issue discussion)
  2. Find the first visible comment textarea inside it
  3. Focus it, enter data
posted by fregante over 4 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests