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

QML TextInput: cursor position behaves badly while using inputMask

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.3.1, 5.9.1
    • Fix Version/s: 5.9.2
    • Environment:
      Win7 x64, Qt Creator 3.1.2
      Sony Xperia Z Ultra (C6802) with Android 4.4.2
      Samsung Galaxy Note 3 with Android 4.4.2
    • Platform/s:
      Android
    • Commits:
      fcfee98f62b8a8b8c3b1ac11cbb23620788a586c (qtbase) bb199cc8ad4111808260f6255312b08c7d81dcbc (qtdeclarative)

      Description

      import QtQuick 2.2
      
      TextInput {
          inputMethodHints: Qt.ImhDialableCharactersOnly
          inputMask: "+7(999)999-99-99;#"
          onCursorPositionChanged: console.log(cursorPosition)
      }
      

      Cursor doesn't want to jump over separators '(', ')' and "-". So user have to retype characters placed after separators.
      On Windows it works properly.

        Attachments

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

          Activity

            People

            Assignee:
            andysh Andy Shaw
            Reporter:
            ilya84a Ilya Aleshkov
            Votes:
            8 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes