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

QML TextInput gets confused with cursor position on QInputMethodEvent with replacement info

    XMLWordPrintable

Details

    Description

      Scenario:

      • TextInput containing a string, say "ab"
      • Cursor positioned in the middle of the string, say at position 1
      • Send QInputMethodEvent with replacement start -1 and length 1, commit string e.g. "c"

      Excepted:

      • TextInput replaces the first character with given commit string, cursor remains at the same place, i.e. at the end of newly committed string.

      Actual outcome:

      • TextInput replaces content correctly, but cursor jumps at the end of the content. With longer replacement length, moves twice the amount forward.

      Also affects QLineEdit. QML TextEdit works ok.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            denexter Andrew den Exter (closed Nokia identity) (Inactive)
            pvuorela Pekka Vuorela
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes