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

Support visual cursor movement of bidirectional text in TextInput and TextEdit

    XMLWordPrintable

Details

    Description

      This was observed with Qt 4.7 from git://gitorious.org/qt/qt.git
      with HEAD at d63778ce3942130eb6fdd8ef173ba50ed0f49a5c

      Run the code below:

      import QtQuick 1.1
      
      Rectangle {
          width: 800
          height: 640
          color: "#404040"
      
          TextInput {
              text: "Some bidi sample text عينة من النص Lorem ipsum dolor عينة من النص"
              anchors.centerIn: parent
              font.pixelSize: 20
              focus: true
              selectByMouse: true
              width: implicitWidth+10
              Rectangle { color: "white"; anchors.fill: parent; z: -1 }
          }
      }
      

      1) Pressing the left/right arrow key, the cursor should move left/right across all the text. Instead it changes direction when moving from English to Arabic and vise versa.
      2) Although the selection of text generally work as expected, dragging a selection by mouse from the left end of the text to the very right end leaves the last section of Arabic unselected.
      3) Place the cursor at the center of an Arabic word and enter some English characters. The characters appear at the right place, but the cursor is not drawn at the right of the last character typed.

      Attachments

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

        Activity

          People

            jpetrell Joona Petrell
            mathiasm Mathias Malmqvist
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes