Page MenuHomePhabricator

When uploading a file by copy-paste, the filename field within Media settings dialog is focused, but it can't be focused later
Closed, ResolvedPublic

Description

Environment

  • Browser: Chrome
  • OS: MacOS

Behavior

  1. Copy an image to your device's clipboard
  2. Open VE
  3. Paste the image you copied in "Step 1." into/onto the page you visited in "Step 2."

Expected

  1. ✅ Notice the Media settings dialog appears, but the filename field is not editable (as the user can only choose the filename at the next step in the upload process)

Actual

  1. ❌ Notice the Media settings dialog appears, with your cursor focused within the filename field, which is editable: https://www.youtube.com/watch?v=VPqC6yyp1Kw (even though its value will be ignored at the next step in the upload process)

Event Timeline

The field is not supposed to be focusable in the first place… (it just displays the select file's name as a confirmation, but you can only edit it in the next step while uploading).

The field is not supposed to be focusable in the first place… (it just displays the select file's name as a confirmation, but you can only edit it in the next step while uploading).

I see; can we revise the scope of this task then to ensure the field is not focusable?

matmarex renamed this task from Unable able to refocus into the filename field within Media settings dialog to When uploading a file by copy-paste, the filename field within Media settings dialog is focused, but it can't be focused later.Jul 4 2023, 11:29 PM
matmarex updated the task description. (Show Details)

Done.

By the way, I can reproduce on Wikipedia, but not locally – something must be different about the configuration in production, and this might be why we haven't noticed this bug before.

Done.

Wonderful – thank you, @matmarex.

Btw: in asking, "...can we revise the scope of this task then to ensure the field is not focusable?" in T340686#8978826 I was wondering whether it'd be technically feasible. I didn't mean to indirectly suggest you do the work of updating the task description. Next time, I"ll be more clear ^ _ ^

Change 954949 had a related patch set uploaded (by Esanders; author: Esanders):

[oojs/ui@master] Make the search input of a SelectFileInputWidget un-focusable

https://gerrit.wikimedia.org/r/954949

Change 954949 merged by jenkins-bot:

[oojs/ui@master] Make the search input of a SelectFileInputWidget un-focusable

https://gerrit.wikimedia.org/r/954949

EAkinloose added a subscriber: EAkinloose.

✅ the Media settings dialog appears, but the filename field is not editable as expeted

Screenshot 2023-09-19 at 17.57.56.png (1×1 px, 143 KB)