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

Indentation in QML RichText after list is wrong

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.6.3, 6.7.0 RC, 6.8.0 FF
    • 5.12.3, 5.13, 5.14, 5.15
    • None
    • Linux, Debian 9.11 with Qt 5.11.3 gcc64 (also seen on windows/msys)
    • Linux/X11
    • 60aeeb0e9 (dev), f0713117d (6.7), d91d5d3ab (6.6)

    Description

      The formatting of text in a QML Text object that has `textFormat: Text.RichText` is wrong for lines that follow a unordered list <ul> with a <br> that is indented itself. See the following example:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Text {
              textFormat: Text.RichText
              text: "<ul><li>one</li><li>two</li></ul>
       <br>
      Hello world indented
      <br>
      Hello world also indented
      
      <ul><li>one</li><li>two</li></ul>
      <br>
      Hello world not indented"
          }
      }
      

      Observed is that the first two "hello world ..." lines are indented on the same level as the closed <ul>.

      I would not expect any of the "hello world ..." lines to be indented since the HTML standard prescribes that whitespace in the source is displayed as a single whitespace.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              amfasis Sander van der Horst
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews