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

QQuickTextInput doesn't manage pre-edit text correctly

    XMLWordPrintable

Details

    • b2103e33f490c96d0068d211c6f2d5b540ca407e (qt/qtdeclarative/dev) f43f7096e8b2f6d9a76617a1901ba5019340ec6e (qt/qtdeclarative/6.2) ec3c3e03732a94b34cd431dd7adc9dc999ab221d (qt/qtdeclarative/6.1) 5a6d15d2ad (qt/tqtc-qtdeclarative/5.15-opensource)

    Description

      The pre-edit text of a text control (e.g., TextField.preeditText) contains partial input from the input method. The input method controls this property with QInputMethodEvent messages.

      An input method (such as Qt Virtual Keyboard) implements the QPlatformInputContext interface. Regarding the implementation of the reset() function, it is stated that other QInputMethodEvent events should not be sent in response to a function call. This excludes all interactions with text control, including pre-edit text clearing. Therefore, text control is solely responsible for clearing pre-edit text in situations where the reset() function is used.

      It has been identified that the QQuickTextInput does not manage the pre-edit text correctly at least in the following use cases:

      • Invocation of TextField.clear()
      • Assignment of text (TextField.text = "some text") (update: setText will clear the pre-edit if the text changes. However, it does not recognize pre-edit text as modified text, so in that case the state is unchanged.)

      In these situations, the partial text remains visible to the user and the status of the text input is indeterminate. This can even lead to a crash in the worst case.

      Instead, QQuickTextInput is expected to clear the pre-edit text in cases where it calls the QInputMethod::reset() function.

      Attachments

        For Gerrit Dashboard: QTBUG-95461
        # Subject Branch Project Status CR V

        Activity

          People

            jakoivik Jarkko Koivikko
            jakoivik Jarkko Koivikko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes