Bug #100298 Deleting a portion of text after its selection with mouse keeps the selection
Submitted: 22 Jul 2020 23:54 Modified: 23 Jul 2020 5:50
Reporter: Rodrigo García López Email Updates:
Status: Verified Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:8.0.21 OS:MacOS (macOS 10.15.x Catalina x86_64)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[22 Jul 2020 23:54] Rodrigo García López
When selecting a portion of the text with the mouse in the SQL Editor and deleting it (backspace or supr) then another selection is made from the start of the previous selection to the position of the mouse pointer at the time of deleting the previous selection.

How to repeat:
1. Enter the following lines in the SQL Editor
  1: delete from access_tokens where id_user = 34;
  2: select * from users;
  3: select * from companies;
  4: select uc.* from user_company;

2. Select the next portion of the text with the mouse starting from top to bottom, (1:1 to 14:2).
  1: delete from access_tokens where id_user = 34;
  2: select * from

3. Keep the pointer of the mouse in the middle of the row at the end of the selection (14:2), 2: select * from
                                 (^ in this position)
if the pointer in edit mode is too bellow or too above of the middle of the row, then the reporting issue cannot be replicated.

4. Delete with backspace or supr.

== Result ==

The remaining text is kept selected after deletion, starting in the previous selection position (1:1) ending in the mouse pointer (14:2).

The remaining text:

  1:  users;
  2: select * from companies;
  3: select uc.* from user_company;

The next text is remains selected:
  1:  users;
  2: select * from

If the previous behaviour happens, then it could happen as long as there is text to be selected.

Suggested fix:
Preventing the described behaviour, countless times i've deleted additional text because it remains selected after typing multiple times backspace.
[23 Jul 2020 0:00] Rodrigo García López
Screen capture replicating the issue

Attachment: Screen Recording 2020-07-22 at 18.58.19.mov (video/quicktime, text), 298.28 KiB.

[23 Jul 2020 5:50] MySQL Verification Team
Hello Rodrigo,

Thank you for the report and feedback.
This behavior can be observed even on Win10.