Ticket #525 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

CSS background not applied to whole iframe

Reported by: Michael Hosse <michael.hosse@…> Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version: trunk
Severity: normal Keywords: iframe body background
Cc:

Description (last modified by gogo) (diff)

If you have a page with some form elements and a xinha, you can not switch from xinha to the other form elements without having a white rectangle in the upper left corner of the window. The reason for this is the missing background-color for the body of the xinha doc. Here is the patch to change this in htmlarea.js it just adds a white background-color which is overwritten if the page has a background color itself.

--- htmlarea.js	(Revision 342)
+++ htmlarea.js	(Arbeitskopie)
@@ -1881,7 +1881,7 @@
            + ".htmtableborders, .htmtableborders td, .htmtableborders th {border : 1px dashed lightgrey ! important;} \n"
            + "</style>\n";
       html += "<style type=\"text/css\">"
-           + "html, body { border: 0px; } \n"
+           + "html, body { border: 0px; background-color: #ffffff;} \n"
            + "span.macro, span.macro ul, span.macro div, span.macro p {background : #CCCCCC;}\n"
            + "</style>\n";

Change History

Changed 8 years ago by gogo

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)

Applied in changeset:392

Changed 7 years ago by ray

  • keywords iframe body background added
  • status changed from closed to reopened
  • resolution deleted

This patch makes that body background styles are only applied to the part of the page where text is.

See http://xinha.gogo.co.nz/punbb/viewtopic.php?pid=3958

Changed 7 years ago by ray

So, this fixes it for Windows. Now we'd only need to know if the original problem on Macs is going well with it.

Index: htmlarea.js
===================================================================
--- htmlarea.js	(revision 593)
+++ htmlarea.js	(working copy)
@@ -2193,7 +2193,8 @@
     html += ".htmtableborders, .htmtableborders td, .htmtableborders th {border : 1px dashed lightgrey ! important;} \n";
     html += "</style>\n";
     html += "<style type=\"text/css\">";
-    html += "html, body { border: 0px;  background-color: #ffffff; } \n";
+    html += "html, body { border: 0px;} \n";
+    html += "body { background-color: #ffffff; } \n";
     html += "span.macro, span.macro ul, span.macro div, span.macro p {background : #CCCCCC;}\n";
     html += "</style>\n";
 

Changed 7 years ago by ray

  • status changed from reopened to closed
  • resolution set to fixed
  • summary changed from Annoying white rectangle with firefox and mac os x to CSS background not applied to whole iframe

The original problem was probably a firefox bug that has vanished in the meantime.[BR] Im so glad to get this fixed as it has bugged me one whole year!

Note: See TracTickets for help on using tickets.