Bug 149306 - Problem with decimal number selection using double click
Summary: Problem with decimal number selection using double click
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.8.1 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Selection
  Show dependency treegraph
 
Reported: 2022-05-26 08:59 UTC by geoff
Modified: 2023-07-04 12:30 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description geoff 2022-05-26 08:59:03 UTC
Description:
If I have a number like:

123,45

any double click selection on decimal parts “123” or “45”, Writer selects the WHOLE number/text, which is not desired.
I usually want to select only the one part (where I clicked), either “123” or “45”.

Btw, if the number format uses the point:

123.45

the selection is OK, but I need “,” as separator.


Steps to Reproduce:
1. Write a number like: 123,45
2. Use double click to select 123 or 45
3. Whole number is selected

Actual Results:
Whole number is selected, expected: partial selection.

Also tried with different LO language/locale, no difference.

Expected Results:
Select either 123 or 45 => the part where I clicked.


Reproducible: Always


User Profile Reset: No



Additional Info:
The selection properly works if "." is used as delimiter:

123.45

double click selects only the desired part.
Comment 1 Dieter 2022-06-10 08:38:15 UTC
I confirm the described behaviour with

Version: 7.4.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 5423dfb8549743bd5045b6e3b1ebad7980e62965
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-GB (de_DE); UI: en-GB
Calc: CL

but for me it is the expected behaviour, because "123,45" is one word and a double click selects one word. Different behaviour between 123,45 and 123.45 can't be explained by different decimal separators in different locale settings (tested with german and English). So for me the behaviour with 123.45 is wrong: If LO counts it as one word, the whole word should be selected by double click.

Additional observation:
Same behaviour, if you assign a shortcut key to "Select Word" command.

I think, at least behaviour across different decimal separators should be consistent.

cc: Design-Team for further input and decision.
Comment 2 Heiko Tietze 2022-06-10 08:55:16 UTC
MSO selects the integral part separately from the fractional part whether using comma or period (lang = en_US, locale = de_DE). The same is true for Google Docs.

LibO selects including the comma, independently from the locale setting and the document setting, and until the period in all cases (confirming Dieter here).

When I select 12345,67€ or 12,345.67$ in this browser window (Chromium) I get the whole number excluding the currency sign.

IMO this selection behavior is superior and we should either accept any separator or make it properly depending on the locale setting, as Dieter suggested.
Comment 3 geoff 2022-06-13 07:50:45 UTC
I am using MS Office since 20+ years and wanted to switch to LO ... but some things in LO are too different and not logical, they reduce my productivity. Yes, I tried different LO options, different locales etc., but no change.

If I have 2 lines with text:

123,45
123.45

The results with:
1) MSO 1997
2) MSO 2007
3) Office 365 (version 2205)

The double click on the number part in any line selects only that part/fraction, NEVER the whole "word".

Even this editor in my browser (FireFox, Windows) does it like that ... but LO behaves differently if "," is used.
Comment 4 Heiko Tietze 2022-06-16 14:08:25 UTC
No further input, so let's do it (consider also currencies). RegEx has some functionality for this purpose, maybe this helps.

See also bug 149254 about selection per mouse vs. keyboard, which includes trailing spaces.
Comment 5 Tammy 2023-07-01 17:21:12 UTC
I was able to reproduce the issue on the following:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c1fe534ae49e7e97b5965a5d1fbf910598215102
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-MX (en_US); UI: en-US
Calc: threaded

I did further testing by separating 123, 45 and it picks up by double clicking on the 45 or 123 it highlights only that portion. However, verified that selecting 123.45 highlights either 45 or 123 when double-clicking.  

It appears to be related to bug 149254.