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

Indentation in QML RichText after list is wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.12.3, 5.13, 5.14, 5.15
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Linux, Debian 9.11 with Qt 5.11.3 gcc64 (also seen on windows/msys)
    • Platform/s:
      Linux/X11

      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

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

          Activity

            People

            • Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              amfasis Sander van der Horst
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews