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

Cursor of Material TextArea in a Flickable not clipped

    XMLWordPrintable

Details

    Description

      Reproducible example here:

      https://bugreports.qt.io/browse/QTBUG-112650?focusedCommentId=717363&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-717363

      A workaround is to set clip: true on the Flickable.

      Works with ScrollView:

      import QtQuick
      import QtQuick.Controls.Material
      
      ApplicationWindow {
          width: 400
          height: 400
          visible: true
          title: scrollView.contentItem.contentY
      
          ScrollView {
              id: scrollView
              width: 200
              height: 200
      
              TextArea {
                  placeholderText: "Type something..."
                  text: "a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn"
      
                  Component.onCompleted: {
                      forceActiveFocus()
                      cursorPosition = length - 1
                      scrollView.contentItem.contentY = 0
                  }
              }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              mitch_curtis Mitch Curtis
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes