Page MenuHomePhabricator

Accesskey "," doesn't work in Code Editor mode
Open, Needs TriagePublic

Description

Highly similar to T259347.

I often use the accesskey "," (comma) to put the cursor in the editing window when editing. However, this doesn't work when Code Editor is toggled on.

Steps to reproduce

  1. Edit a module or a .js or .css page
  2. Confirm that the accesskey works normally by toggling the code editor off, clicking anywhere outside of the editing area and then pressing Alt+, (it could be Alt+, Ctrl+Alt+,, Ctrl+Shift+, or something else depending on your browser/setup/OS)
  3. Toggle syntax highlighting on
  4. Press outside the editing area
  5. Press Alt+, – it won't put the cursor in the editing area.

Fix

Luckily, the fix, which I've tried in my browsers' inspect mode, is extremely easy: Simply add accesskey="," to the textarea with class ace_text-input noime.

Event Timeline

Note: I tried finding the right place in the code to add the necessary jQuery to move the accesskey (like I did for the patch in T259347#6351638), but was unable to find any reference to the <textarea> that is created by CodeEditor. Maybe @brion would know more?