Why can I not place my cursor in first few words of a line (in Ubuntu)?

When I try positioning the cursor (using both mouse and touchpad) anywhere in the first few words of any line, it jumps up to the header. I cannot select the first words of a line with the mouse or touchpad. I can only do it by moving the cursor with the arrow keys.

I’m using Ubuntu 18.04 and LibreOffice Writer Version: 6.0.7.3

I have uploaded a sample doc I am having trouble with. Cursor jumping problem.odt

The original document was .doc. I tried converting it to .odt to see if that made a difference. It didn’t. Someone else created the original. I am an editor. I am able to edit everything fine, but I can’t position the cursor as I would like. I have this problem with many of the docs I am sent to edit.

The problem doesn’t occur if I open the original .doc file in Word on a Mac.

If, using Ubuntu and LibreOffice, I delete the comment I have put in the margin (see file I uploaded), the problem disappears and I can position the cursor normally.

LibreOffice Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.2

From XML forensics, the problematic words have been “highlighted” with character style normaltextrun1. They also have direct formatting applied for 12 pt size.

I don’t see anything special with this character style and the strange behaviour persists after selecting all text and resetting attributes with Default style character style. Even Format>Clear direct formatting has no effect.

The only strange point is the font size for direct-formatting is set through font-size-complex instead of font-size, as if complex text layout had been enabled to handle Asian text. Another “anonymous” styles has settings for Chinese.

Deleting the comment also wipe out the “anonymous” style with Chinese parameters. If you added the comments, you should check your configuration for them or even Tools>Options if you don"t need Chinese since it seems to be the cause of the problem (I have nevertheless no explanation for the behaviour).

If the comments are already present in the original .doc file, ask the sender to give you an .odt file (M$ Word is supposed to be able to produce such documents, though there are compatibility issues anyway).

Hope that this will give you clues.

That’s really interesting. Thanks very much for your answer. I will investigate further…

UPDATE:
I have been playing around and think I have partially worked out what the problem is. It seems to be a problem with the style-name of the heading.

I copied the “2A. ABSTRACT” heading from the problematic doc to a fresh unsaved file in Writer. And I still had the same problem with the jumping cursor.

SO then I looked at the “2A. ABSTRACT” heading in a text editor (after converting the file to .fodt). There was a line of code that said: <text:h text:style-name=“P5” text:outline-level=“1”>text:soft-page-break/<text:span text:style-name=“T1”>.

All I did to solve the problem was change “P5” to “P4”.

Does anyone know why that makes the difference?

Names like “P5” are internal temporary names for paragraph styles. When you changed from “P5” to “P4”, you changed the style for something else. Look in the paragraph style section to get the human-friendly style name. “P5” should stand for some Heading n. Which style is “P4”?

Here’s the style info I found for P4 and P5 (the only other place in the file P4 and P5 occur):

<style:style style:name=“P4” style:family=“paragraph” style:parent-style-name=“Heading_20_1” style:list-style-name="">
<style:paragraph-properties fo:margin-left=“0cm” fo:margin-right=“0cm” fo:text-indent=“0cm” style:auto-text-indent=“false” fo:break-before=“page”/>
</style:style>
<style:style style:name=“P5” style:family=“paragraph” style:parent-style-name=“Heading_20_1” style:master-page-name=“Standard”>
<style:paragraph-properties style:page-number=“2” fo:break-before=“page”>

Any thoughts?

Bot styles are derived from Heading1, probably with direct formatting added. P4 has a page break before and P5 also has a page break before and forces the page number to restart from 2. There may be more because I don’t see the closing </style> (2 needed).