Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-37791

Blank div elements in text blocks break Lessons page div structure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: OPEN
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 12.0
    • Fix Version/s: None
    • Component/s: Lessons
    • Labels:
    • Previous Issue Keys:
      LSNBLDR-837

      Description

      Adding blank div elements to a rich-text block in a Lessons page can break the page’s html structure. The following repro steps demonstrate this bug:

      1. Navigate to an empty Lessons page.
      2. Add a text block and enter a paragraph with text “Block 1”.
      3. Add another text block with text “Block 2”.
      4. Click the edit button for the first text block.
      5. Click Source and append to the existing html the snippet ‘<div></div>’.
      6. Click Save.

      Consequently, the closing </div> for div.textbox for the first block has somehow been omitted. This omission surfaces as problems for some user actions. For example, by subsequently clicking the “Add Item to Bottom of Column” button and then clicking “Add section break above”, the expected section break is not created. Instead an NPE is thrown because in this particular case, show-page.js cannot locate an itemId within the malformed html.

      Oddly, this bug does not surface if the html snippet added in step 5 above has a non-breaking space entity within the pair of div tags. (I had stumbled upon this bug when I added the snippet ‘<div style=”clear: both”></div>’ to a rich text block in order to break up the floating behavior of text around a preceding image.)

      So far I’m not sure if this bug is isolated to Lessons code-- (e.g., did I inadvertently introduce this with -LSNBLDR-815-?) or if this might be a Rich Server Faces (RSF) issue. The last line in the following snippet from ShowPage.html is the specific div.textbox whose closing </div> is somehow being dropped.

      <div rsf:id="itemSpan" class="right-col">

      <div rsf:id="item-groups-titles-text" class="item-group-titles"></div>

      <div rsf:id="content" class="textbox"></div>

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                • Assignee:
                  maintenanceteam Core Team
                  Reporter:
                  hornersa Sean Horner
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Git Integration