Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53517

Text input expands incorrectly when moving cursor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.7
    • Virtual Keyboard
    • None
    • Qt 5.7 with virtual keyboard at 0c70872a81aab39465606ab37333caf55064482a on Linux/xcb

    Description

      When composing text and then reposition the cursor with the mouse in the text input field the virtual keyboard starts to send additional input to the window although no text was composed.

      Steps to reproduce:
      1) QT_IM_MODULE=qtvirtualkeyboard kwrite
      2) click into kwrite text field, keyboard opens
      3) Compose Test
      4) commit the state by e.g. passing focus to another window
      5) Click into text "Test"
      6) "Test" expands to something like " TeTeststTeTestst"

      From my investigation I think this is caused by the virtual keyboard not adding an attribute with QInputMethodEvent::Cursor to the QInputMethodEvent with the preedit text.

      I attached two screenshots showing the composing in point 3 (virt-keyboard-stage1.png) and point 6 (virt-keyboard-stage2.png).

      The problem is not specific to kwrite, I could also reproduce it with all other applications I tried.

      Attachments

        1. virt-keyboard-stage1.png
          235 kB
          Martin Gräßlin
        2. virt-keyboard-stage2.png
          235 kB
          Martin Gräßlin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jakoivik Jarkko Koivikko
            mgraesslin Martin Gräßlin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes