Opened 14 years ago

Closed 13 years ago

#525 closed defect (fixed)

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)

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 (4)

comment:1 Changed 14 years ago by gogo

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from new to closed

Applied in changeset:392

comment:2 Changed 13 years ago by ray

  • Keywords iframe body background added
  • Resolution fixed deleted
  • Status changed from closed to reopened

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

comment:3 Changed 13 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";
 

comment:4 Changed 13 years ago by ray

  • Resolution set to fixed
  • Status changed from reopened to closed
  • 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.