refined-github icon indicating copy to clipboard operation
refined-github copied to clipboard

`quick-review` doesn't autofocus the field

Open fregante opened this issue 1 year ago • 6 comments

Description

This selector doesn't match anything:

https://github.com/refined-github/refined-github/blob/e0eeb515af6fb6931c6c5b2bf991ffff4b775b9e/source/features/quick-review.tsx#L80-L81

First reported in https://github.com/refined-github/refined-github/issues/7256

How to replicate the issue + URL

  1. Open https://github.com/refined-github/sandbox/pull/12/files#review-changes-modal
  2. See the field not being focused

Extension version

24.2.8

Browser(s) used

Safari

fregante avatar Feb 23 '24 10:02 fregante

hi, it sounds like only the css class needs to be fixed? I could prepare a PR to target the comment textarea or is the selector for some parent element?

sgrell avatar Mar 25 '24 08:03 sgrell

Yes I think only the selector needs to be updated. PR welcome

fregante avatar Mar 25 '24 09:03 fregante

I had a look at it, unfortunately I couldn't find an element to make the delegate call with toggle work, so that the check for open works. If I disable the if in focusReviewTextarea and only use .js-reviews-container as a selector, the textarea is highlighted but of course now we try to focus the textarea too often.

So I think, I won't be able to help here.

sgrell avatar Mar 25 '24 12:03 sgrell

@fregante any idea when you could have a look at this?

huehnerlady avatar May 27 '24 10:05 huehnerlady

PR welcome

fregante avatar May 27 '24 10:05 fregante

@fregante we did have a look at it and unfortunately it did not work out, so there seems to be a different problem there we cannot grasp as we have only very limited knowledge of Typescript

huehnerlady avatar May 27 '24 11:05 huehnerlady