Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Review Queue Helper] Mod flag dialog autoclosing on single quote #40

Closed
Zeeveez opened this issue Aug 18, 2019 · 10 comments
Closed

[Review Queue Helper] Mod flag dialog autoclosing on single quote #40

Zeeveez opened this issue Aug 18, 2019 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@Zeeveez
Copy link
Contributor

Zeeveez commented Aug 18, 2019

Describe the bug
When writing a custom mod flag on a post pressing the single quote key (') closes the flag dialog.

To Reproduce
Steps to reproduce the behavior:

  1. Open any question.
  2. Click the flag button to open the flag dialog and choose "in need of moderator intervention".
  3. Enter a single quote (this can be on it's own or as part of a full message).
  4. Flag dialog closes.

Expected behavior
The flag dialog doesn't close and the ' appears in the message

Desktop (please complete the following information):

  • OS: Windows 10 Home
  • Browser: Google Chrome
  • Version: Version 76.0.3809.100 (Official Build) (64-bit)
@samliew
Copy link
Owner

samliew commented Aug 18, 2019

Unable to repro single quote closing the flag dialog when custom flag textarea is focused. Did you mean the tilde key instead?

Screenshot_2019-08-19_090830

@Zeeveez
Copy link
Contributor Author

Zeeveez commented Aug 19, 2019

No, I did mean single quote, here's line from userscript extension:

image

Userscript header:

// ==UserScript==
// @name         Review Queue Helper
// @description  Keyboard shortcuts, skips accepted questions and audits (to save review quota)
// @homepage     https://github.com/samliew/SO-mod-userscripts
// @author       @samliew
// @version      1.9.3
//
// @include      https://*stackoverflow.com/review*
// @include      https://*serverfault.com/review*
// @include      https://*superuser.com/review*
// @include      https://*askubuntu.com/review*
// @include      https://*mathoverflow.net/review*
// @include      https://*.stackexchange.com/review*
//
// @include      https://*stackoverflow.com/questions/*
// @include      https://*serverfault.com/questions/*
// @include      https://*superuser.com/questions/*
// @include      https://*askubuntu.com/questions/*
// @include      https://*mathoverflow.net/questions/*
// @include      https://*.stackexchange.com/questions/*
//
// @exclude      *chat.*
// @exclude      https://stackoverflow.com/c/*
// @exclude      https://stackoverflow.blog*
//
// @grant        GM_addStyle
// ==/UserScript==

Screencap gif of issue:

modboxclose

This script was the only one installed at time of recording and issue.

Note, recorded on 4K screen so captures may be quite large and need scrolling, the issue occurs when ' is pressed even without the mod flag text field focused. Previously hadn't tested this, pressing the flag button followed by ' will close it immediately (You can ping me (NickA) in SO chat (SOCVR or Meta Room) for possibly faster responses).

@Zeeveez
Copy link
Contributor Author

Zeeveez commented Aug 19, 2019

Userscript extension is Tampermonkey v4.8.41

@samliew
Copy link
Owner

samliew commented Aug 19, 2019

Still unable to repro on Win 10 Chrome 76 and when it's the only script running, but I'll just add an ignore this particular single-quote key into the script

1a3a779

@samliew samliew added the bug Something isn't working label Aug 19, 2019
@samliew samliew self-assigned this Aug 19, 2019
@Zeeveez
Copy link
Contributor Author

Zeeveez commented Aug 19, 2019

This may be a keyboard issue, see below gif, when I enter ' it is captured as ~ and when I enter ~ it is captured as ' in Chrome (using the keyboard tester at https://www.keyboardtester.com/). Likely this'll be a non-issue but will investigate. Using a British keyboard with OS language settings set to English (UK).

single quote test

@Zeeveez
Copy link
Contributor Author

Zeeveez commented Aug 19, 2019

Click the ' key on my keyboard provides following event:

image

which/keyCode: 192

Backtick (`) results in 223.

Tilde results in 222.

@Zeeveez
Copy link
Contributor Author

Zeeveez commented Aug 19, 2019

To clarify on last points about keyboard settings, see here another couple gifs using onscreen keyboard, this shows my actual keyboard layout, which is obviously different from the keyboard tester online:

single quote test

single quote test2

samliew added a commit that referenced this issue Aug 19, 2019
@samliew
Copy link
Owner

samliew commented Aug 19, 2019

ahh, so tilde and single quote keycodes are swapped on the UK keyboard? I better not use tilde as a shortcut then :(

@samliew
Copy link
Owner

samliew commented Aug 19, 2019

thanks for reporting the issue, it should be fine now 👍

@samliew samliew closed this as completed Aug 19, 2019
@Zeeveez
Copy link
Contributor Author

Zeeveez commented Aug 19, 2019

Worked a charm, thanks, I've opened a SU question to see if I can find the reason it's happening: https://superuser.com/questions/1472716/quote-is-detected-as-tilde-in-web-browsers-and-vice-versa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants