Closed Bug 8147 Opened 25 years ago Closed 25 years ago

Boxes display incorrectly when style set to display:none

Categories

(Core :: XUL, defect, P2)

PowerPC
Mac System 8.6
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: hangas, Assigned: eric)

Details

Attachments

(2 files)

In the Address Book window the card view pane (lower right pane) displays
incorrectly when calling setAttribute("style", "display:none") on a box
containing the card view.  It displays what appears to be the top of the window
in this lower pane.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
This works for me. The following example creates a box with 2 buttons called
"hideit". It then creates 2 other buttons called "hide" and "show" that set the
"hideit" box's display to either none or block. As you will set the box appears
and disappears.

<?xml version="1.0"?>
<?xml-stylesheet href="xul.css" type="text/css"?>
<?xml-stylesheet href="navigator.css" type="text/css"?>

<!DOCTYPE window>

<window style="width: 100%; height: 100%"
xmlns:html="http://www.w3.org/TR/REC-html40"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onConstruction="Startup()">

<html:script>
   function hide()
   {
      document.getElementById("tohide").setAttribute("style","display:none");
	  dumb("hidden");
   }
   function show()
   {
      document.getElementById("tohide").setAttribute("style","display:inline");
	  dumb("hidden");
   }
</html:script>

<box align="horizontal">
      <box id="tohide" align="vertical">
		<titledbutton src="resource:/res/toolbar/TB_Forward.gif"
align="bottom" value="Button1"/>
		<titledbutton src="resource:/res/toolbar/TB_Forward.gif"
align="bottom" value="Button2"/>
      </box>

      <titledbutton src="resource:/res/toolbar/TB_Forward.gif" align="bottom"
value="Hide" onclick="hide()"/>
      <titledbutton src="resource:/res/toolbar/TB_Forward.gif" align="bottom"
value="Show" onclick="show()"/>
</box>

</window>
Status: RESOLVED → REOPENED
I tried this simple case listed by evaughan, and it works for me too.  My
original case still fails in a big way.  I will attach a file that should be used
to replace the addressbook.js file in the mozilla/mailnews/addrbook/resources/
content directory.  This file sets display:none on the box in the card view pane
when there is nothing to display, it then sets display:block when an item in the
results pane (upper right) is selected.
Resolution: WORKSFORME → ---
Target Milestone: M8
I will have to sit down and take a look but a fix doesn't look like it will make
m7 moving to m8.
Status: REOPENED → ASSIGNED
Target Milestone: M8 → M9
Paul is this bug still valid? Perhaps I can sit down with you at some point and
try to figure it out.
This bug is blocking the development of two of my dialogs.  I have some crude
work-arounds that do not provide correct behavior.  I have not checked to see if
this still fails (in the past couple weeks) because I have had no news that
anything was fixed.
Paul is this working for you now?
Assignee: evaughan → hangas
Status: ASSIGNED → NEW
No, if a box contains other boxes and html:div's then setting display:none on the
outside box does not hide the div's.  Also if the box starts out with
display:none set then later set to display:block the contents to not always show
up.
Assignee: hangas → trudelle
Assignee: trudelle → evaughan
Priority: P3 → P2
reassigning to evaughan as p2 for m9. Paul, do you want this to be set to
blocker severity, as implied by your comment?  If so, priority can be set to p1.
Status: NEW → ASSIGNED
Target Milestone: M9 → M10
I can not make this happen. I have enlosed examples with boxes and divs. Can you
provide me with a sample that fails?
Target Milestone: M10 → M11
How about we move this to M14 and I will use my very slow workaround for PR1?  At
that point I will visit you and we can hack around with the card view JS to make
the bug happen.
I just tested this today and it is working now.  I think that this can be marked

as fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
QA Contact: ckritzer → hangas
Assigning to originator per new organizational structure.
Status: RESOLVED → VERIFIED
Marking verified.  It has been working well.
BULK MOVE: Changing component from XUL to XP Toolkit/Widgets: XUL.  XUL 
component will be deleted.
Component: XUL → XP Toolkit/Widgets: XUL
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: hangas → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: