QTextEdit jumps to keyboard cursor when losing focus

Bug #1363723 reported by Doug Brown
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu Version: Ubuntu 14.04.1 LTS
libqt5gui5 version: 5.2.1+dfsg-1ubuntu14.2

I am running a stock install of Ubuntu 14.04.1, fully updated as of this writing. If you are using the ibus input method (chosen by default in Ubuntu), there is a problem that can cause QTextEdit to lose its scroll position when it loses focus. I first noticed this inside of Qt Creator but it actually affects all Qt 5 programs. Here are the steps to reproduce it:

- Fill a QTextEdit (for example, a Qt Creator editor window) with enough text so that there is a scrollbar.
- Make sure the text insertion cursor is at the bottom of the file.
- With your mouse wheel, scroll up so that the text insertion cursor is no longer visible on-screen.
- Now click on the containing window's title bar, or choose an item from a menu, or click on another widget in the window. Just something to cause focus to change.

What I expect to happen:

Nothing should happen to the QTextEdit's scroll position. It should stay where it is.

What actually happens:

The QTextEdit scrolls down so the text insertion cursor is visible, as if I had typed a character.

This is actually a known bug in the ibus input method plugin (libibusplatforminputcontextplugin.so), which is installed as part of Ubuntu's libqt5gui5 package:
https://bugreports.qt-project.org/browse/QTBUG-40755

A fix was committed upstream to the qtbase 5.4 branch:
https://qt.gitorious.org/qt/qtbase/commit/e5f3a25253263b67f3f211d76ed76ddc2298916e

I don't know about what the release schedule looks like for trusty and Qt, but I'd like to respectfully request that this patch somehow makes its way into 14.04 for my own sanity while working inside of Qt Creator. :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.