Bug 143298 - Writer: CTRL-TAB to cycle through suggestions for word completion does not work
Summary: Writer: CTRL-TAB to cycle through suggestions for word completion does not work
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0 target:7.2.0.2
Keywords:
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2021-07-11 11:30 UTC by al F
Modified: 2021-08-09 05:34 UTC (History)
3 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 al F 2021-07-11 11:30:03 UTC
Description:
Ediiting, Formatting: When editing text I am used to hitting CTRL-TAB to cycle through suggestions for word completions. This behaviour is described in the help documents of LibreOffice and works as expected in Calc: when editing text in cells, CTRL-TAB does cycle alternatives.

However, Writer acts as if I only hit TAB: a tab stop is inserted. Other shortcuts involving the CTRL key works as expected: CTRL-O to open files, CTRL-S / CTRL-SHIFT-S to save, CTRL-Z to undo, etc.

I had the same problem with a LibreOffice install from the Ubuntu repositories. I then asked a question at ask.libreoffice.org and was encouraged to try the newer version from LibreOffice's PPA. The problem persists. (https://ask.libreoffice.org/en/question/293091/word-completions-ctrl-tab-wont-cycle-alternative-words-does-not-work/)

I tried 

My system is (K)Ubuntu Studio 20.04 with LibreOffice Version: 7.1.4.2

Steps to Reproduce:
1. Tools > Autocorrect > Autocorrect options > Word completion > Enable word completion
2. Type the start of a long word in the list. The first option to complete shows as a tooltip.
3. Hit CTRL-TAB to cycle to next option.

Actual Results:
Instead of cycling to the next option, a tab stop is inserted.

Expected Results:
Cycling to next option in word completion list.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
CTRL-TAB works as expected in other programs like Firefox or Thunderbird, and even even in Calc.

Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: kf5
Locale: nb-NO (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.1.4~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 1 Justin L 2021-07-13 17:01:39 UTC
I cannot reproduce. Ctrl-Tab word-completion is working for me. Ubuntu 20.04, LO 7.1.4.2 from Ubuntu fresh PPA.

Perhaps try clearing your user profile by renaming ~/.config/libreoffice/4/.
Comment 2 Telesto 2021-07-14 08:02:12 UTC
Working for me on Windows
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4e0a7df2dfa10bc52d5dbda34f43e0bc0df22ae7
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

This might be back-end related.. as this reminds me bit of bug 140445
Comment 3 al F 2021-07-14 10:02:38 UTC
(In reply to Justin L from comment #1)
> I cannot reproduce. Ctrl-Tab word-completion is working for me. Ubuntu
> 20.04, LO 7.1.4.2 from Ubuntu fresh PPA.
> 
> Perhaps try clearing your user profile by renaming ~/.config/libreoffice/4/.

I did a profile reset, to no avail.

Can the problem be related to environment? For example working on Ubuntu or Xubuntu but not Kubuntu / Plasma. GTK vs QT?
Comment 4 al F 2021-07-15 07:05:26 UTC
(In reply to Telesto from comment #2)
> Working for me on Windows
> Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
> Build ID: 4e0a7df2dfa10bc52d5dbda34f43e0bc0df22ae7
> CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
> Locale: nl-NL (nl_NL); UI: en-US
> Calc: CL
> 
> This might be back-end related.. as this reminds me bit of bug 140445

By back-end, do you mean GTK or QT? I can see why it reminds you of that other bug. Maybe I could test by changing whether LireOffice uses GTK or QT, but I don't understand how to do it. From your linked post I found instructions on how to use QT on XFCE by setting export SAL_USE_VCLPLUGIN=qt5 in the /etc/profile.d/libreoffice-fresh.sh file - but on my system I don't find any such file.

I did start LibreOffice in Safe Mode and also reset my profile. On Plasma the global shortcut CTRL-TAB defaults to switcing tasks. I did remove that shortcut, setting it to 'none', but that didn't help either.
Comment 5 Buovjaga 2021-07-17 15:41:25 UTC
Please launch from the command line with

SAL_USE_VCLPLUGIN=gen libreoffice
Comment 6 al F 2021-07-17 18:00:19 UTC
(In reply to Buovjaga from comment #5)
> Please launch from the command line with
> 
> SAL_USE_VCLPLUGIN=gen libreoffice

This launhces libreoffice in a style that looks like windows 2000 :-)

But yes! CTRL-TAB works as expected.

I tried launching SAL_USE_VCLPLUGIN=gtk3 and kf5 and qt and X11. All of them looks the same and all them misbehave on CTRL-TAB.

Does this mean we know where the problem is?
Comment 7 Buovjaga 2021-07-17 18:26:03 UTC
(In reply to al F from comment #6)
> (In reply to Buovjaga from comment #5)
> > Please launch from the command line with
> > 
> > SAL_USE_VCLPLUGIN=gen libreoffice
> 
> This launhces libreoffice in a style that looks like windows 2000 :-)
> 
> But yes! CTRL-TAB works as expected.
> 
> I tried launching SAL_USE_VCLPLUGIN=gtk3 and kf5 and qt and X11. All of them
> looks the same and all them misbehave on CTRL-TAB.
> 
> Does this mean we know where the problem is?

Hmm, if you mean you launched with SAL_USE_VCLPLUGIN=x11, that will have no effect as such an alias does not exist. I don't know what you mean by "all of them look the same". gtk3 and kf5 certainly don't look the same. You can check from Help - About VCL: what you are actually running at a given moment.

Can you confirm that it misbehaves when you see VCL: gtk3 in Help - About?
Comment 8 al F 2021-07-17 19:10:46 UTC
(In reply to Buovjaga from comment #7)
> (In reply to al F from comment #6)
> > (In reply to Buovjaga from comment #5)
> > > Please launch from the command line with
> > > 
> > > SAL_USE_VCLPLUGIN=gen libreoffice
> > 
> > This launhces libreoffice in a style that looks like windows 2000 :-)
> > 
> > But yes! CTRL-TAB works as expected.
> > 
> > I tried launching SAL_USE_VCLPLUGIN=gtk3 and kf5 and qt and X11. All of them
> > looks the same and all them misbehave on CTRL-TAB.
> > 
> > Does this mean we know where the problem is?
> 
> Hmm, if you mean you launched with SAL_USE_VCLPLUGIN=x11, that will have no
> effect as such an alias does not exist. I don't know what you mean by "all
> of them look the same". gtk3 and kf5 certainly don't look the same. You can
> check from Help - About VCL: what you are actually running at a given moment.
> 
> Can you confirm that it misbehaves when you see VCL: gtk3 in Help - About?

No. Help > About says

> UI render: default; VCL: kf5

regardless which command (SAL_USE_VCLPLUGIN=gtk3/qt/kf5 libreoffice) I use to launch.
Comment 9 Buovjaga 2021-07-18 06:21:46 UTC
Then you could install the libreoffice-gtk3 package, if you want.

https://packages.ubuntu.com/focal/libreoffice-gtk3
Comment 10 al F 2021-07-18 08:38:35 UTC
(In reply to Buovjaga from comment #9)
> Then you could install the libreoffice-gtk3 package, if you want.
> 
> https://packages.ubuntu.com/focal/libreoffice-gtk3

I installed libreoffice-gtk3 and did SAL_USE_VCLPLUGIN=gtk3 libreoffice, which starts with an error message:

> (soffice:6831): Gdk-WARNING **: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.

CTRL-TAB now works as expected, but there's the error message and the gtk file picker instead of the qt plasma file picker.

Does this mean there's a problem with the libreoffice-kf5 package?
Comment 11 Buovjaga 2021-07-18 09:10:37 UTC
(In reply to al F from comment #10)
> (In reply to Buovjaga from comment #9)
> > Then you could install the libreoffice-gtk3 package, if you want.
> > 
> > https://packages.ubuntu.com/focal/libreoffice-gtk3
> 
> I installed libreoffice-gtk3 and did SAL_USE_VCLPLUGIN=gtk3 libreoffice,
> which starts with an error message:
> 
> > (soffice:6831): Gdk-WARNING **: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.

Note: this is not an error message, but a warning.

> CTRL-TAB now works as expected, but there's the error message and the gtk
> file picker instead of the qt plasma file picker.
> 
> Does this mean there's a problem with the libreoffice-kf5 package?

There is a problem with the kf5 VCL backend, yes.
Comment 12 Michael Weghorn 2021-07-20 06:10:13 UTC
I haven't heard of that feature before. One simple way of reproducing the issue is by using this text after enabling the option as described earlier:

* Type text:

"The Parliament is the Parliament.
The Parliament1 is the Parliament1."

* In a new Line type "The Parlia", then wait until the word suggestion shows up and try to switch from "Parliament" to "Parliament1" using Ctrl+Tab.


Jan-Marek has a pending fix in Gerrit: https://gerrit.libreoffice.org/c/core/+/119235
Comment 13 al F 2021-07-20 06:49:18 UTC
(In reply to Michael Weghorn from comment #12)
> I haven't heard of that feature before. One simple way of reproducing the
> issue is by using this text after enabling the option as described earlier:
> 
> * Type text:
> 
> "The Parliament is the Parliament.
> The Parliament1 is the Parliament1."
> 
> * In a new Line type "The Parlia", then wait until the word suggestion shows
> up and try to switch from "Parliament" to "Parliament1" using Ctrl+Tab.
> 
> 
> Jan-Marek has a pending fix in Gerrit:
> https://gerrit.libreoffice.org/c/core/+/119235

That's good! I'll just just the GTK backend as a workaround then, and wait for a fix (unfortunately I'm clueless as a coder)
Comment 14 Commit Notification 2021-07-20 13:21:11 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/862fdb98ca271b60a831cd5420fd16d5f9c1c747

tdf#143298 Qt5 send SalEvent::KeyModChange events

It will be available in 7.3.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 15 al F 2021-07-20 13:59:53 UTC
(In reply to Commit Notification from comment #14)
> Jan-Marek Glogowski committed a patch related to this issue.
> It has been pushed to "master":
> 
> https://git.libreoffice.org/core/commit/
> 862fdb98ca271b60a831cd5420fd16d5f9c1c747
> 
> tdf#143298 Qt5 send SalEvent::KeyModChange events
> 
> It will be available in 7.3.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.

Will be testing soon. Thank you for quick patching!
Comment 16 Commit Notification 2021-07-21 02:07:05 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/289ed73a2359f6221ca36c61cf96e4f4b72f61cc

tdf#143298 Qt5 send SalEvent::KeyModChange events

It will be available in 7.2.0.2.

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 17 al F 2021-07-22 09:25:07 UTC
Not sure if it's too early. I couldn't find 7.2.0.2 yet for download, so I tested

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: cd2b5168e8ef1cb6e721bc5220421464ed723096
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-07-21_14:56:23
Calc: threaded

On this version, the word-completion tooltip does not appear at all and CTRL-TAB inserts a tab stop.

I'll try again later.
Comment 18 Buovjaga 2021-07-22 10:20:56 UTC
(In reply to al F from comment #17)
> Not sure if it's too early. I couldn't find 7.2.0.2 yet for download, so I
> tested
> 
> Version: 7.3.0.0.alpha0+ / LibreOffice Community
> Build ID: cd2b5168e8ef1cb6e721bc5220421464ed723096
> CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: en-US (en_US.UTF-8); UI: en-US
> TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time:
> 2021-07-21_14:56:23
> Calc: threaded
> 
> On this version, the word-completion tooltip does not appear at all and
> CTRL-TAB inserts a tab stop.
> 
> I'll try again later.

It's not too early, this build has the fix.
Comment 19 al F 2021-07-22 15:00:52 UTC
Hmm, then the fix does not seem to work for me.
Comment 20 Michael Weghorn 2021-07-23 04:15:06 UTC
(In reply to al F from comment #19)
> Hmm, then the fix does not seem to work for me.

I tried with the steps from comment 12 and it worked for me. Did you use the same or some other ones?
Comment 21 Jan-Marek Glogowski 2021-07-23 19:42:11 UTC
(In reply to al F from comment #19)
> Hmm, then the fix does not seem to work for me.

Hmm - hard to say what your problem is. I did test my fix, but didn't realize I broke unicode support with it (I tested normal typing and shortcuts only...). That is already reported and fixed in tdf#143493. So you want a newer build from today, but this should not affect this fix.

(In reply to al F from comment #17)
> On this version, the word-completion tooltip does not appear at all and
> CTRL-TAB inserts a tab stop.
> 
> I'll try again later.

It works also for me, but the questions would the same then before:

* Do tooltips work for you at all?
* Is the feature still enabled?
* Does it work with SAL_USE_VCLPLUGIN=gen
* Did you check "Help - About" for kf5 / qt5?
Comment 22 al F 2021-08-09 05:16:09 UTC
(In reply to Jan-Marek Glogowski from comment #21)
> (In reply to al F from comment #19)
> > Hmm, then the fix does not seem to work for me.
> 
> Hmm - hard to say what your problem is. I did test my fix, but didn't
> realize I broke unicode support with it (I tested normal typing and
> shortcuts only...). That is already reported and fixed in tdf#143493. So you
> want a newer build from today, but this should not affect this fix.
> 
> (In reply to al F from comment #17)
> > On this version, the word-completion tooltip does not appear at all and
> > CTRL-TAB inserts a tab stop.
> > 
> > I'll try again later.
> 
> It works also for me, but the questions would the same then before:
> 
> * Do tooltips work for you at all?
> * Is the feature still enabled?
> * Does it work with SAL_USE_VCLPLUGIN=gen
> * Did you check "Help - About" for kf5 / qt5?

Today I downloaded https://www.libreoffice.org/donate/dl/deb-x86_64/7.2.0/en-US/LibreOffice_7.2.0.2_Linux_x86-64_deb.tar.gz

Help > About says "render: default; VCL: kf5 (cairo+xcb)"

CTRL-TAB to cycle word completion suggestions works as expected in this version.

Thank you very much for the fix!