Boston skin widget_rows macro generates extra space

Bug #98269 reported by Michael Dudzik
2
Affects Status Importance Assigned to Milestone
Zope 3
Status tracked in 3.4
3.2
Fix Committed
Low
Unassigned
3.3
Fix Committed
Low
Unassigned
3.4
Fix Released
Low
Unassigned

Bug Description

Summary: Firefox renders the Boston skin widget_rows macro with an extra 1em of space at the top of the table for each widget row in the table. For an edit view of a content object with lots of fields, it's very noticeable. It's a trivial fix, though.

Details:
In Boston skin zope/app/boston/browser/widget_macros.pt, the widget_rows macro has a repeat like this:

      <table id="widgets" border="0" cellspacing="0" cellpadding="0">
        <div class="row" tal:repeat="widget view/widgets">
          <metal:block define-macro="widget_row">
            <tr>
              ...
            </tr>
          </metal:block>
        </div>
      </table>

generating html like:
      <table id="widgets" border="0" cellspacing="0" cellpadding="0">
        <div class="row" >
            <tr>
              ...
            </tr>
        </div>
        <div class="row" >
            <tr>
              ...
            </tr>
        </div>
        <div class="row" >
            <tr>
              ...
            </tr>
        </div>
        ....
      </table>

However, Firefox "ejects" the <div> from the table and renders it like this:
        <div class="row" > </div>
        <div class="row" > </div>
        <div class="row" > </div>
         ...
      <table id="widgets" border="0" cellspacing="0" cellpadding="0">
            <tr>
              ...
            </tr>
            <tr>
              ...
            </tr>
           <tr>
              ...
            </tr>
        ....
      </table>

Since each div.row has a style.padding-top= 1em, For each widget row, 1em of blank space is seen above the table. I wouldn't have noticed this except for a content object I have with lots of fields.

Internet explorer doesn't have a problem with the code. I don't know which browser is correct, but adding tal:omit-tag as follows will eliminate the problem.

line 6: <div class="row" tal:omit-tag="" tal:repeat="widget view/widgets">

Revision history for this message
Christian Theune (ctheune) wrote :

Made the HTML valid. Revision 78758.

Revision history for this message
Christian Theune (ctheune) wrote :

Fixed in revision 78759.

Revision history for this message
Christian Theune (ctheune) wrote :

Fixed in revision 78761.

Revision history for this message
Philipp von Weitershausen (philikon) wrote :

We've had two 3.4.0 betas since this fix has been committed, therefore setting status to Fix Released for the 3.4 series.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.