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

QML WebView: Qt.inputMethod.cursorRectangle not updated correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.3.0
    • 5.2.0
    • WebKit
    • None
    • Ubuntu 12.04

    Description

      The cursorRectangle property for QInputMethod is not updated properly when the focus is on an input field that's at the beginning of the line.

      Example HTML:

      <html>
      	<head>
      		Titolo
      
      	</head>
      	<body>
      		<!-- this works correctly -->
      		</br>
      		foo
      		<input id="working-input" type="text" value="Type here" onfocus=value=''>
      
      		<!-- only the second one works correctly -->
      		</br>
      		<input id="not-working" type="text" value="Type here">
      		<input id="working-password" type="password" value="fuffa">
      	</body>
      </html>
      

      If you try to input some characters in the "not-working" input field, the reported cursorRectangle is always (0, 0, 0, 0). I've noticed it happens when the input field is rendered as the first item on the line; for example, any input in "working-input" or "working-password" will correctly update the cursorRectangle property.

      Also, notice that if you select any text in the "not-working" input field, the reported cursorRectangle is valid.

      See attached example project.

      Attachments

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

        Activity

          People

            lucaotta Luca Ottaviano
            lucaotta Luca Ottaviano
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes