Open Bug 1667140 Opened 4 years ago Updated 4 years ago

Ctrl+a not working for an input field in the Theia IDE

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

80 Branch
defect

Tracking

()

People

(Reporter: alexcmonnet, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

  1. Open a project in a Gitpod workspace.
  2. Create a new file in the Theia IDE
  3. Select/focus on the input field in the pop-up titled 'New File'
  4. Use the select all keyboard shortcut 'ctrl + a'
  5. Note that the text in the input field is not selected.

Additional Info:
Bug was logged with Gitpod at: https://github.com/gitpod-io/gitpod/issues/1890

Actual results:

When the 'ctrl+a' shortcut is executed the selected/highlighted area does not change.

Expected results:

When the 'ctrl+a' shortcut is executed, the entire input of the field should be selected and highlighted.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

I think it is similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1640883 just for selectall document command.

Gecko does not support execCommand('selectall') in <input> elements. execCommand() is generally discouraged to use, and currently a better cross-platform way is to call .select() on each input element.

Masayuki, do you think it's worth adding support for this case? Both WebKit/Blink support it, so maybe yes for web compat?

Severity: -- → S3
Flags: needinfo?(masayuki)

Yeah, I plan to work on it after shipping beforeinput (bug 1220696). It requires some traditional behavior change unfortunately, though (when <input> or <textarea> in contenteditable has focus).

Status: UNCONFIRMED → NEW
Depends on: 1220696
Ever confirmed: true
Flags: needinfo?(masayuki)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.