phpmyadmin icon indicating copy to clipboard operation
phpmyadmin copied to clipboard

Ctrl+Left/Right inside a field editor overrides common "go to next word" behavior

Open php4fan opened this issue 3 years ago • 1 comments

Describe the bug

It is a common convention EVERYWHERE when you are inside an editable text box (anything where you can input text) that the Ctrl+Right and Ctrl+Left keyboard shortcuts are used to jump to the previous or next word. This happens in text editors, textareas in browsers by default, even in terminals. Just everywhere. Even in contexts where you are not editing text but there is a caret that you can move. For example, when you select text in Chrome (and in most other contexts where you can select text to copy), Ctrl+Shift+Right will extend the selection to the next word, etc.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://demo.phpmyadmin.net/
  2. Open a database, and browse a table that has rows. Preferrably, one where some of the columns is of type VARCHAR or TEXT, and that contains multiple words worth of text
  3. Double click on a cell that contains text

For example, open the mysql database, go to the help_category table, and double click on the cell that corresponds to the column "name" for the id 5: that should contain the text "Geographic Features"

  1. Position the text cursor (i.e. caret) at the beginning of the text; in the example, before the word "Geographic"
  2. Hit Ctrl+Right, that is, hold the Ctrl key and then press the Right arrow key

Expected behavior

You are editing the value of the field and you are in a textarea. When hitting Ctrl+Right focus should remain within that textarea and the text cursor/caret should jump to the next word.

Observed behavior

(guys this section is still missing in this stupid bug report template)

Focus goes to the next column, you are no longer editing that column and you are now editing a different column. Additionally, changes that you may have made to the contents of the cell are saved, which I'm not sure whether makes it worse or less bad - the very wrong thing is that you are moved away from editing the value in the first place, anyway.

Screenshots

Server configuration

whatever the current live demo is

Client configuration

  • Browser: Chrome
  • Operating system: Linux

php4fan avatar Apr 25 '22 14:04 php4fan

Hi @php4fan

Thank you for this report

(guys this section is still missing in this stupid bug report template)

What would you think about

### Observed behavior

If the description section lacks some information, write a description here.

williamdes avatar May 30 '22 14:05 williamdes