Bug 160163 - Text field should reset placeholder if all content is deleted
Summary: Text field should reset placeholder if all content is deleted
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium enhancement
Assignee: Juergen Funk (CIB)
URL:
Whiteboard: target:25.2.0 target:24.8.1
Keywords:
Depends on:
Blocks: Fields
  Show dependency treegraph
 
Reported: 2024-03-12 09:35 UTC by Gabor Kelemen (allotropia)
Modified: 2024-10-17 11:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The field filled in Word 16 and Writer side by side (118.14 KB, image/png)
2024-03-12 09:35 UTC, Gabor Kelemen (allotropia)
Details
After deleting the fields contents, it is reset in Word but disappears in Writer (123.40 KB, image/png)
2024-03-12 09:36 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-03-12 09:35:36 UTC
Created attachment 193073 [details]
The field filled in Word 16 and Writer side by side

This is a followup to bug 150037

When the text field gets its non-default content deleted, Word resets the placeholder, but in Writer, nothing special happens and we are stuck with a practically invisible (it's there, just has 0 width) text field.

1. Open attachment 181299 [details]
2. Type into the field after "TIME SPENT"
3. Backspace until all text is gone
-> placeholder is not reset to the default, unlike in Word

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ff113b34dd6f54765995440cbedd27483fadb844
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: de-DE
Calc: default

works like this since 3.5 at least, even worse before, not a recent regression.
Comment 1 Gabor Kelemen (allotropia) 2024-03-12 09:36:39 UTC
Created attachment 193074 [details]
After deleting the fields contents, it is reset in Word but disappears in Writer
Comment 2 Stéphane Guillou (stragu) 2024-03-28 14:13:54 UTC
Reproduced:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2146e66d8df2b7b6a2dd868e886cae76aaf7f48b
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

I agee this would improve the UX.
Comment 3 Juergen Funk (CIB) 2024-07-18 07:45:40 UTC
Patch here https://gerrit.libreoffice.org/c/core/+/170596
Comment 4 Commit Notification 2024-07-24 22:50:40 UTC
Juergen Funk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e8a271dd53d605a835c493eef5c34e4fb077f16d

tdf#160163 reset placeholder in Text field when empty

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2024-07-29 22:27:38 UTC
Juergen Funk committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/7a19fa057024d8cf08551dd9005db3c8f7e2c768

tdf#160163 reset placeholder in Text field when empty

It will be available in 24.8.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Gabor Kelemen (allotropia) 2024-07-30 09:29:17 UTC
Verified in

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 46f7dcc5f499892ef093147b3f739c258bbf6b81
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

The placeholder is reset if all text is deleted, whether it is default placeholder or custom text.
Comment 7 Commit Notification 2024-10-17 11:53:35 UTC
Juergen Funk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7303a0375bb3ae087fb4ff77d0efc9182c60a372

tdf#160163 improvment when reset placeholder in Text field

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.