Bug 162291 - Setting Bold is undone when clicking into non-empty document
Summary: Setting Bold is undone when clicking into non-empty document
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Character
  Show dependency treegraph
 
Reported: 2024-08-01 11:17 UTC by Stephan Bergmann
Modified: 2024-09-04 12:04 UTC (History)
2 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 Stephan Bergmann 2024-08-01 11:17:39 UTC
1  Start with a fresh Writer document,
2  type some text (just "x"),
3  enable Bold (by any of the means of typing the Ctrl-B shortcut, or pressing the "Bold" icon in the Formatting toolbar, or "Format - Text - Bold", or even remotely dispatching <.uno:Bold> via UNO),
4  then directly afterwards do a "neutral" (in the sense that it doesn't click on anything sensitive like the header area) mouse-button-1 click into the Writer document area (e.g., anywhere in the empty document area beyond/below the text already typed):

The Bold state is disabled again (the toolbar icon is unset, typing any further text will not be bold).

This does not happen when the document is empty, i.e., when step 2 above is left out.  The Bold state will then remain enabled after clicking into the document area.

I can reproduce this at least back to "Version: 5.3.0.0.alpha1+ Build ID: 4136757b4e51c4e6f7cb4132c95538a7f831ef2c" (i.e., the first version in <https://bibisect.libreoffice.org/linux-64-5.4>).  I didn't yet bother to check still older versions.
Comment 1 m_a_riosv 2024-08-01 15:31:31 UTC
It also happens with OOo.

But I don't understand why it should work in any other way.

As I understand, the formatting apply to the selected text, it is not an option to stay selected.
Comment 2 Stephan Bergmann 2024-08-01 15:54:36 UTC
(In reply to m_a_riosv from comment #1)
> But I don't understand why it should work in any other way.
> 
> As I understand, the formatting apply to the selected text, it is not an
> option to stay selected.

But why should the behavior be different depending on whether there's already any text present in the document (i.e., whether or not I execute step 2 of my reproducer in comment 0)?
Comment 3 Buovjaga 2024-09-04 12:04:52 UTC
Yes, it also does not get undone, if you start a new paragraph after the first one, activate Bold and click somewhere.