Bug 132667 - Custom properties: Adding new custom property doesn't focus Name field anymore
Summary: Custom properties: Adding new custom property doesn't focus Name field anymore
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium minor
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: File-Properties
  Show dependency treegraph
 
Reported: 2020-05-04 02:09 UTC by Aron Budea
Modified: 2021-06-07 17:11 UTC (History)
1 user (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 Aron Budea 2020-05-04 02:09:23 UTC
In a Writer document, open File -> Properties, thene switch to Custom Properties tab. Press Add Property, which adds a new entry.

The focus should move to the Name field of the fresh entry, but it doesn't.

Observed using LO 7.0.0.0.alpha0+ (4ba1909f12b49f020195b5e767045340717ce6df), 6.0.0.3 / Ubuntu.
It works fine in 5.4.0.3.
=> regression

This started from the following commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=272a96da03522a82db4185e7858d05375f3ea95e
author		Szymon Kłos <szymon.klos@collabora.com>	2017-11-07 20:39:06 +0100
committer	Szymon Kłos <szymon.klos@collabora.com>	2017-11-08 09:50:14 +0100

"tdf#100922 Refactor Custom Properties page"

The code change should probably make the last visible entry get focused after this line:
https://opengrok.libreoffice.org/xref/core/sfx2/source/dialog/dinfdlg.cxx?r=bedba76a#1459
The CreateNewLine() function focuses the newly created entry, but that isn't much relevant after the performance fix.
Comment 1 Andreas Heinisch 2021-05-20 12:50:55 UTC
Proposed patch:  https://gerrit.libreoffice.org/c/core/+/115872

I think with the refactoring of the dialog even another problem arised (Bug 142396).
Comment 2 Commit Notification 2021-06-07 17:04:02 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/629fe3a8e6fdf1602add0803b7d06e70215cda33

tdf#132667 - Grab focus on the last inserted property

It will be available in 7.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.