Bug 167041 - Image "wrapped in background" disallows accessing foreground objects
Summary: Image "wrapped in background" disallows accessing foreground objects
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.4.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-16 07:49 UTC by Konstantin Kharlamov
Modified: 2025-07-02 14:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
A file with "wrapped in background" image and some texts in foreground (573.18 KB, application/vnd.oasis.opendocument.text)
2025-06-16 07:50 UTC, Konstantin Kharlamov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kharlamov 2025-06-16 07:49:33 UTC
Description:
"Wrap in background" option interaction with foreground objects isn't documented¹, but from OnlyOffice and MS Office behavior it seems it supposed not to obstruct focusing front objects. LO Writer seems like trying to follow this, because if you open a document from steps-to-reproduce and avoid focusing the image, you can focus foreground objects just fine. That only breaks after you focus background image.

1: https://help.libreoffice.org/latest/en-US/text/swriter/01/05060200.html

Steps to Reproduce:
1. Open the attached file
2. Focus the background image
3. Try using mouse to put caret to any of the text fields in foreground

Actual Results:
Text fields can't be focused, it always selects the background image instead

Expected Results:
Clicking foreground object should focus foreground object.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.4.3 (X86_64) / LibreOffice Community
Build ID: 520(Build:3)
CPU threads: 12; OS: Linux 6.15; UI render: default; VCL: kf6 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
25.2.4-2
Calc: threaded
Comment 1 Konstantin Kharlamov 2025-06-16 07:50:08 UTC
Created attachment 201303 [details]
A file with "wrapped in background" image and some texts in foreground
Comment 2 m_a_riosv 2025-06-16 22:27:00 UTC
Maybe because the image is anchor 'To character'?
Comment 3 Konstantin Kharlamov 2025-06-17 06:23:39 UTC
(In reply to m_a_riosv from comment #2)
> Maybe because the image is anchor 'To character'?

Reading documentation for anchoring¹, I don't really see why would this have any effect on focusing. AFAIU, anchoring makes sure the anchored object would move along with one it's anchored to. And again, both MS Office and OnlyOffice focus foreground objects with such documents just fine (well, I haven't tested the test.odt specifically with MS Office because MS Office doesn't run on my system, but the bugreport came to be because a colleague sent similar document, created in MS Office).

1: https://help.libreoffice.org/latest/en-GB/text/swriter/guide/anchor_object.html
Comment 4 Konstantin Kharlamov 2025-06-17 06:30:29 UTC
> And again, both MS Office and OnlyOffice focus foreground objects with such
> documents just fine (well, I haven't tested the test.odt specifically with MS
> Office because MS Office doesn't run on my system, but the bugreport came to
> be because a colleague sent similar document, created in MS Office).

For good measure I just tested with WPS Office. It required me to re-save the document as docx, because WPS Office doesn't support odt, but other than that, focusing background doesn't disallow focusing foreground text. And I then re-tested same docx with LibreOffice to make sure something haven't lost due to format change: no, the problem is still there.
Comment 5 Konstantin Kharlamov 2025-07-02 14:09:54 UTC
Is there any workaround? I am getting these documents, and editing with multiple office suites a single document just because libreoffice can't focus text leads to things looking fine in one office suite but not the other.

I tried changing the anchor to other possible values (stemming from @m_a_riosv's comment above), but it just makes the image cover the text up completely, so not only I can't focus it, but in addition I can't see it.