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:
- Navigate to an empty Lessons page.
- Add a text block and enter a paragraph with text “Block 1”.
- Add another text block with text “Block 2”.
- Click the edit button for the first text block.
- Click Source and append to the existing html the snippet ‘<div></div>’.
- 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 -
-?) 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. LSNBLDR-815
<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>