Bug 160847 - [EDITING] Autoinput triggered when disabled on backspace.
Summary: [EDITING] Autoinput triggered when disabled on backspace.
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-28 09:42 UTC by symbioma.trix
Modified: 2024-04-29 13:41 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Demonstration of autoinput backspace bug. (1.69 MB, video/mp4)
2024-04-28 21:38 UTC, symbioma.trix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description symbioma.trix 2024-04-28 09:42:26 UTC
Description:
When autoinput is disabled, it still gets activated (shows functions and inserts them on enter) after pressing backspace.
This issue has been around since at least 11/2016, as mentioned in an offhand comment here (https://bugs.documentfoundation.org/show_bug.cgi?id=104185#c3). Should be at least version 5.2, I haven't verified how far back it goes or whether it's been fixed in version 24 (but I see nothing in the release notes about it at least).

Steps to Reproduce:
1. Tools -> Turn off AutoInput.
2. Type "=cc" in any cell.
3. Press backspace.
4. Press enter; the function replaces is added to the cell as if autoinput is enabled.

Actual Results:
On pressing backspace, the autoinput menu will pop up with functions corresponding to the remaining letter c (ceiling, ceiling.math, ceiling.precise and 56 more);
on pressing enter, cell content is changed to "=CEILING()".

Expected Results:
Cell contents remain "=C", cursor goes to cell below.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.3.7.2 (x64) / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 12; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-US (en_IL); UI: en-US
Calc: CL
Comment 1 ady 2024-04-28 18:01:53 UTC
Is this happening in a specific worksheet?

I would suggest closing LO completely, open Calc anew with an empty new spreadsheet, review the AutoInput setting to set it OFF and retest in such condition, with nothing else in the worksheet.

Perhaps it would be also worth testing with LO's safe mode and/or resetting the profile.

FWIW, I was not able to replicate the behavior using several versions of LO from 7.2 to 7.6.
Comment 2 symbioma.trix 2024-04-28 18:47:29 UTC
I did some more testing:
- If I open a new sheet with autoinput having been turned off beforehand, then it will *not* exhibit the backspace anomaly, as you say. Meanwhile, other open sheets still do.
- In this new sheet, if I turn autoinput on, type something which triggers autoinput, then turn autoinput off, then it will once again exhibit the backspace anomaly.
- The same is true for an older installation that I have, 6.4.7.2, 

So it appears to be some sort of global flag for the sheet, set once on init, and by usage, if I were to take a wild guess.

In any case, that's good enough for me, as I intend to leave it off. Thanks.
Comment 3 ady 2024-04-28 19:12:43 UTC
So let's make this explicit.

STR:

1. Start with AutoInput set to ON.
2. On an empty cell, type:
=cc

3. While still in cell's edit mode, set AutoInput to OFF by using the mouse on menu Tools > AutoInput.

4. Press the backspace key, so the content of the cell is now:
=c

5. Press [ENTER] > Calc reacts as if AutoInput was still ON.


Since AutoInput is now OFF, this behavior will not happen again, until and unless the same starting conditions and steps are reproduced again.

This issue is also avoided by turning AutoInput OFF before starting the edition of the cell.

IMHO, this is a very minor issue, happening only under very specific steps, and it is "solved" by itself.
Comment 4 symbioma.trix 2024-04-28 21:38:04 UTC
Not exactly. The case you described is much more specific. What matters is, to have had autoinput fire off once whilst ON within the sheet. If it has fired off once in the open sheet, I always get suggestions on backspace until reopening (in fact, you can even reopen with autoinput=ON, just turn it off before the first event and you're good).

I'll attach a demonstration, that should make it easier to understand.
Comment 5 symbioma.trix 2024-04-28 21:38:57 UTC
Created attachment 193885 [details]
Demonstration of autoinput backspace bug.
Comment 6 m_a_riosv 2024-04-28 23:23:34 UTC
Perhaps the interpretation of what Autoinput does is not correct.

https://help.libreoffice.org/24.8/en-US/text/scalc/01/06130000.html?&DbPAR=CALC&System=WIN
Comment 7 ady 2024-04-29 00:31:18 UTC
(In reply to symbioma.trix from comment #4)
> Not exactly.

So, if AutoInput was ON at any time since the specific spreadsheet was opened, then even after setting it OFF, the backspace will trigger it again, for that specific cell edition.

Setting AutoInput to OFF (permanently), saving the spreadsheet and reloading it will avoid the trigger when using backspace.

FWIW, I can see one advantage with the current behavior: when I set AutoInput to OFF in a specific session, normally Calc will not trigger the function's suggestions, unless I made some typo (so I use backspace). Some users would consider this behavior useful, whether it is intentional or not; some kind of middle choice between ON vs OFF.

For users permanently setting AutoInput to OFF, this will not be an issue.

IMHO, I still see this behavior as a minor issue, FWIW.
Comment 8 ady 2024-04-29 00:33:26 UTC
(In reply to ady from comment #7)
> (In reply to symbioma.trix from comment #4)
> > Not exactly.
> 
> So, if AutoInput was ON at any time since the specific spreadsheet was
> opened, then even after setting it OFF, the backspace will trigger it again,
> for that specific cell edition.

Sorry, not "that specific cell edition" but rather for "that specific session on that spreadsheet".
Comment 9 symbioma.trix 2024-04-29 13:41:20 UTC
From your description, I take it that cleared things up, I'm glad.

Well, I can speak on behalf of no other users but myself and own experience. As a long time (hobbyist) programmer, I've got hard wired "muscle memory" for enter = newline, tab = autocomplete, so that role reversal in libre has been quite a hindrance for years, when attempting to type some complex cell formulae and ending up repeatedly having to change back whatever rogue function just overrode the $D I was trying to change to $E (because autocorrect changes happen to kill the in-cell undo stack, mind). Finally got fed up and found a way to disable the feature altogether on the docs, only to see it was still happening, filed a bug report as such. I did have a glimpse at the code, and whilst autoinput only shows up in ~4 places in sc, everything around it seems to be really tangled up (understandably), not really for me.

We are in agreement about this being a minor issue, that's why I set it as such in the first place. Perhaps even trivial now, since the workaround of reopening the sheet and leaving the setting off (at least since libre 7+) is relatively simple.