Bug 135454 - UI: Other fields aren't updated at manual input (you have to jump to different field)
Summary: UI: Other fields aren't updated at manual input (you have to jump to differen...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
: 138964 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-05 07:59 UTC by Telesto
Modified: 2023-09-21 09:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (8.33 KB, application/vnd.oasis.opendocument.text)
2020-08-05 08:00 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-08-05 07:59:55 UTC
Description:
UI: Other fields aren't updated at manual input (you have to jump to different field)

Steps to Reproduce:
1. Open the attached file
2. Table -> Properties -> Table tab
3. Change the width with scroll wheel -> Instant update
4. Change the value by clicking up down -. Instant update
5. Enter a value in the width field -> Nothing. (you have to scroll or press tab)

Actual Results:
Nothing

Expected Results:
Ideally also an update (or some sensible way to trigger an update) (press Enter is applying etc). 
Tried clicking outside the spinbox (so clicking the dialog itself; only force an update; not working either


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: ru-RU (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-08-05 08:00:31 UTC
Created attachment 163957 [details]
Example file
Comment 2 Telesto 2020-08-05 08:06:58 UTC
@Caolán
I'm bit of a pain in the ass about this. IIRC I complained about this also related to the File -> export -> PNG -> PNG dialog

I simply find it strange that's all sorts input methods can 'update' except when entering a value. This from user perspective; there is probably a developer answer to that.

At minimum clicking somewhere inside the dialog (outside input fields) should trigger an update (if nothing else is possible). At least that would work for me (but i'm of course not the general population; so no clue if that would make sense at all)
Comment 3 Caolán McNamara 2020-08-05 09:52:39 UTC
On up/down/scroll the change is simple and the value is changed by that event. During manual typing to edit the value does not change until there is some trigger to indicate that the edit is complete. Losing focus is the usual trigger that indicates the edit is done and the value is updated from the input (and the output formatted from the value). And then value-change is broadcast and other widgets whose values depends on the spinbutton update based on the new value.

If you update the value on any edit change, then you have two additional problems. You shouldn't format the number and replace the text currently being edited as it would change the text of the widget while you are typing. The main problem is that as you type other widgets that depend on the value of the widget you are editing will update immediately to match their relationship to the value. Tab into your widget, press 123, the value goes to 0 as its overwritten, then to 1, then to 12, then to 123. You get radical noisy jumps in the dependent widgets as they clamp to their mins and maxes as those "intermediate" values arrive.

As a real world example, if you look at LibreOffice 4.1, calc, format cells, alignment and the degrees spin button, you cannot delete the "0" there with backspace, it reappears immediately, if you use the up button to take it to e.g. 20, then try to delete with backspace the 20 to replace it with something else it will turn into 2 with the cursor before 2. If you decide to just type 40 before that 2, planning to delete the 2 afterwards then the 402 is clamped and turned into 359 before you get a chance to turn 402 into 40. So IMO an update immediately model is fraught with difficulties too, but one where the update happens on losing focus is simple, and is the built-in way that a GtkSpinButton works out of the box.

Though, adding a key binding to update a spinbutton from the users input without moving focus elsewhere would be fairly easy to do if some such binding like F9 or shift+return was seen as acceptable. A bare Enter/Return is already taken typically to close the dialog as if OK was pressed.
Comment 4 Telesto 2020-08-05 10:00:50 UTC
Lets add Heiko
Comment 5 Heiko Tietze 2020-08-05 12:35:24 UTC
Would expect on spinner with limits that up/down become disabled. And when you manually enter a value above or below it's adjusted to the maximum/minimum.
Comment 6 Caolán McNamara 2020-12-16 09:04:32 UTC
*** Bug 138964 has been marked as a duplicate of this bug. ***
Comment 7 Aron Budea 2020-12-16 11:46:59 UTC
(In reply to Caolán McNamara from comment #3)
> As a real world example, if you look at LibreOffice 4.1, calc, format cells,
> alignment and the degrees spin button, you cannot delete the "0" there with
> backspace, it reappears immediately, if you use the up button to take it to
> e.g. 20, then try to delete with backspace the 20 to replace it with
> something else it will turn into 2 with the cursor before 2. If you decide
> to just type 40 before that 2, planning to delete the 2 afterwards then the
> 402 is clamped and turned into 359 before you get a chance to turn 402 into
> 40. So IMO an update immediately model is fraught with difficulties too, but
> one where the update happens on losing focus is simple, and is the built-in
> way that a GtkSpinButton works out of the box.
I agree that this can be quite annoying, and like the idea of using a function key for manual update.

(In reply to Heiko Tietze from comment #5)
> Would expect on spinner with limits that up/down become disabled. And when
> you manually enter a value above or below it's adjusted to the
> maximum/minimum.
Heiko, please note that this bug report is specifically about validating, and autocorrecting input during typing. There's no question that the input should be validated and the spinner limits should be updated once the user is done with the change (= the control loses focus).
Comment 8 Telesto 2020-12-22 07:16:40 UTC
For editing columns sizes.. which work dynamically this still being annoying.. you get bug 139109.. as you likely not see the remains will be added to columns 1..

My horrific idea is a time based trigger.. say 2 sec since last keypress or so.. But surely not elegant and likely error prone
Comment 9 Telesto 2021-01-03 16:43:19 UTC
Only reasoning for bug 138964 and for now more interest in something compared to what's desired.

I would love to be able to click somewhere in the dialog triggering an update. You currently need to specifically click inside one of the edit fields to force an update

I'm talking about Table Properties -> Column tab. But holds also true for PNG export options. 

*Question*
Why is Image 'Compress dialog" Reduce image resolution working as desired/expected?
Comment 10 Ioan-Cristian CÎRSTEA 2023-09-21 09:55:35 UTC
I don't get an instant update even on scroll or by clicking -/+ buttons. Not sure if this is the intended behaviour.

Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Debian package version: 4:7.4.7-1
Calc: threaded