Skip to content

Add confirm-short-comments feature - #4141

Closed
darkred wants to merge 3 commits into
refined-github:mainfrom
darkred:confirm-short-comments
Closed

Add confirm-short-comments feature#4141
darkred wants to merge 3 commits into
refined-github:mainfrom
darkred:confirm-short-comments

Conversation

@darkred

@darkred darkred commented Mar 20, 2021

Copy link
Copy Markdown
Contributor

(Second attempt, after #4123)

Closes #3911

Test URLs

Any new/existing issue page: e.g.
https://github.com/sindresorhus/refined-github/issues/new
#3911

Screenshot

111637477-23fc9500-8802-11eb-8c1b-4023b7b1c371


Currently I'm getting these 3 TypeScript errors in VSCode, which I'm unable to fix. (screenshot)
(I have run npm run lint and npm run fix).

  • Property 'value' does not exist on type 'Element'. (line 10)
  • Argument of type 'Element | null' is not assignable to parameter of type 'HTMLTextAreaElement | HTMLInputElement'.
    Type 'null' is not assignable to type 'HTMLTextAreaElement | HTMLInputElement'. (line 12)
  • Generic type 'Event' requires between 0 and 2 type arguments. (line 17)

 
In the New Issue page it seems to be working ok.

In an existing issue page I'm having these problems:

  • If I block a submission once, then I can only submit by clicking Submit (the submit shortcut Ctrl+Enter doesn't work anymore). Additionally, sometimes I cannot submit not even via the button, unless I click somewhere away and then back in the textarea. (My use of textFieldEdit -inside the refocus() function- doesn't seem to help in this case, in constrast to the New issue page)
  • after blocking a submission, the Close with comment button becomes disabled. The Comment button remains enabled.

Any help would be most welcome !

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Display confirmation popup whenever trying to submit a issue/comment in GitHub that's too short, and maybe every time

1 participant