Bug 62325 - EDITING: Deleting selected text leaves unexpected font under cursor
Summary: EDITING: Deleting selected text leaves unexpected font under cursor
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Formatting-Text-Diverse
  Show dependency treegraph
 
Reported: 2013-03-14 08:45 UTC by Matthew Francis
Modified: 2019-10-12 19:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of unexpected font after deletion (8.73 KB, application/vnd.oasis.opendocument.text)
2013-03-14 08:45 UTC, Matthew Francis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Francis 2013-03-14 08:45:04 UTC
Created attachment 76513 [details]
Example of unexpected font after deletion

When deleting selected text, the font at the end, rather than the start, of the selection is left under the cursor afterwards. This is unexpected.

For example,

If I type "January 1st, 2013", "st" is autocorrected to superscript
Then, if I change my mind, select "1st", delete it, and type "2nd" instead, the result is that the entire text "2nd" is superscripted (not just the "nd")
Comment 1 Tim Lloyd 2013-03-15 01:36:20 UTC
Problem recreated on Windows 7 (LO 4.0.03) and Fedora 18 (LO 4.0.1.2).

Enter the date as described
Move the cursor to the left of the number field (ie. 1st) and delete
any subsequent text entered from this point is superscripted (based on the last character deleted?)
Comment 2 QA Administrators 2015-04-19 03:20:15 UTC Comment hidden (obsolete)
Comment 3 Tim Lloyd 2015-04-19 04:04:38 UTC
Same behaviour. Still present under Fedora 22

Version: 4.5.0.0.alpha0+
Build ID: e7ca29d0b2eaf40dc32b53196282350cc75ed3a0
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-04-14_04:33:14
Locale: en_AU

and

Version: 4.4.2.2
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6
Locale: en_AU
Comment 4 Gordo 2015-06-13 12:44:44 UTC
In certain instances it is possible to get the correct outcome when deleting a number and ordinal indicator and typing in new text.

1. New Text Document.
2. Type “This is the 1st test.” and Enter.
3. Double click on “1st” and Delete.
4. Type “2nd” and Space and delete extra space.
Result:
The “2” is normal and the “nd” is in superscript.

Sometimes after the text has been deleted, the superscript icon in the toolbar is on, but if you type something anyway it will be normal.  If you go back and try the steps again with what was already changed then it will not work.  Also, typing over the selection does not work.  If the ordinal number is at the end of a paragraph then it will not work (with no period).  If there is more than one in the same paragraph then it will only work on one of them (This is the 1st time the 2nd has been tested).

Opening a document and using this method on existing numbers and ordinal indicators does not work but typing new text in, selecting it, deleting it, and replacing it, does work.  The only way to change existing documents is to:
A)
1. Select number and ordinal indicator.
2. Ctrl + m.
3. a. Delete or
   b. Type over selection.
4. a. Type intended text or
   b. Enter space.
B)
1. Select number and ordinal indicator and space.
2. a. Delete or
   b. Type over selection.
3. a. Type intended text or
   b. Enter space.

With option A you need to enter a space after it in order for it to auto-correct.  This leaves you with an extra space that needs to be deleted.  So...option B.

I thought for the times that it does work, when deleting a selection there is a check for a normal positioned character at the beginning and a superscript character at the end and post-deletion the character position is defaulted to normal (the selection may cover more than just the number and ordinal indicator so checking for one digit followed by characters with superscript would not be sufficient).  I also tested manually applied superscript as ordinal numbers and superscript between spaces and selecting and deleting did not revert to normal.

Is it possible to auto-correct to a field that holds the ordinal indicator so that typing after it or deleting it would not result in superscript text.  Shame there is no Unicode for the characters.

Added bug 70554 to see also.

Windows Vista 64
Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16

Version: 5.1.0.0.alpha1+
Build ID: 5fc0cbbc1254223fedf0f78c5e7539219b228697
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-11_04:30:51
Comment 5 QA Administrators 2016-09-20 10:00:49 UTC Comment hidden (obsolete)
Comment 6 Mike 2017-12-07 17:50:47 UTC
Issue still there

Version: 6.1.0.0.alpha0+ (x64)
Build ID: 1d8cb97fea57b81a1ab151b88c2180e646bd401b
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-12-07_02:07:17
Locale: de-DE (de_DE); Calc: CL
Comment 7 Thomas Lendo 2018-10-03 20:48:42 UTC
Maybe the same root cause as in bug 107857.
Comment 8 QA Administrators 2019-10-04 03:06:14 UTC Comment hidden (obsolete)
Comment 9 Thomas Lendo 2019-10-12 19:46:20 UTC
Still repro with Version: 6.3.2.2 (x64)
Build-ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; VCL: win