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

Japanese input does not work well under landscape mode on Android device

XMLWordPrintable

    • Android
    • 2025wk34s2QtforAndroid, 2025wk36s2QtforAndroid

      A minimal reproducer can be as simple as

      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          TextInput {
              Rectangle { anchors.fill: parent; color: "red"; opacity: 0.2 }
      
              anchors.centerIn: parent
              width: parent.width * 0.8
              height: 50
              text: "TestText"
          }
      }
      

      And one can use Android built-in keyboard, and try to input something to TextInput. But to reproduce the issue, one has to am sure that:
      1. Use Japanese keyboard.
      2. Phone is under landscape mode so that input does not go directly into TextInput but some sort of "intermediate fullscreen input interface", like that:

      3. It is Android 15 or 16. I haven't tried older Android versions, so I am not sure.

      Then one can confirm 3 things:
      1. preeditText is not shown. When you input something, there should be preeditText that shows the current input (before committing). But there is none.
      2. Press enter, then it is "double input". Either preeditText is committed twice, or it somehow coexists with the final input. But anyway, you will get double what you want to input.
      3. Deleting does not work in that "fullscreen input interface". You won't see letters being deleted. It is only reflected in TextInput once keyboard is hidden. But strangely, deleting starts to work from the second time, i.e. you click into TextInput again and try to delete something, then you can see deletion happening in real time. This is a problem only seen in Android 16 though. The other 2 problems are seen also in Android 15.

      To better illustrate the idea, a screen record is attached.

      P.S. it should be mainly about preeditText. Chinese input also shows similar problem. With only once difference, that Chinese input does not suffer from "double input". Other 2 problems are the same. Also, it is irrelavent to which type of Text* input component is used. TextInput, TextField, TextArea...all show the same issue. That further suggests that it may be a QPA issue.

        1. image-2025-08-01-18-36-55-293.png
          92 kB
          Luqiao Chen
        2. screen-20250801-154624.mp4
          5.42 MB
          Luqiao Chen
        3. Android_15_IME_JP_Qt684.mp4
          8.10 MB
          Luqiao Chen
        4. Android 15 IME English&Japanese sidebyside 2025-08-07 09-22-17.webm
          1.17 MB
          Konsta Alajärvi
        For Gerrit Dashboard: QTBUG-138858
        # Subject Branch Project Status CR V

            koalajar Konsta Alajärvi
            luqiaochen Luqiao Chen
            Votes:
            8 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change