Opened 13 years ago

Closed 11 years ago

#665 closed defect (worksforme)

SplitContainer has unexpected results when SizeMin is 0 (or smaller than the text)

Reported by: demoness@… Owned by: Adam Peller
Priority: high Milestone: 1.1
Component: Dijit Version: 0.2
Keywords: bordercontainer Cc:
Blocked By: Blocking:

Description

I'm trying to use the SplitContainer? to make a pane that could be completely hidden if the user pulls the bar all the way up to the top of the page. This works, mostly, however I've found three issues with it:

1 - If you move the bar up and down quickly, the pane it's supposed to be covering will have some overflow or bleed-over elements to it.

2 - The pane that's to be covered doesn't always cover completely. If the pane contains another dojo element (such as a tree) it'll often cover it. However, if the pane just contains plain text, it will only cover up to the bottom of the text, then the text overflows.

3 - If there is any padding to the pane to be covered, the split bar goes all the way to the top, but it does not cover the pane.

This behavior can be noticed in the SplitContainer? Widget Demo at: http://archive.dojotoolkit.org/nightly/tests/widget/test_SplitContainer.html

With the container on the right side, if you pull the bar all the way to the left, 'horizontal' will overlap and bleed through.

I've also included my own test case:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	
	<style>
	body, html
   {
      margin: 0px;
      height: 100%;
      width: 100%;
      font-family: helvetica, verdana, sans-serif;
      font-size: .90em;
   }
   .testclass1
   {
      border: 1px solid black;
      background: #ccc;
      
   }
   .testclass2
   {
   }
	</style>
	
	<title>Test Split Draw</title>

   <!-- Begin Dojo JScript -->
	<script type="text/javascript">
			var djConfig = {isDebug: false
							,debugAtAllCosts : false		
							,debugContainerId : "_dojoDebugConsole"
							};
		</script>

<script type="text/javascript" src="../../dojo.js"></script>

		<script language="JavaScript" type="text/javascript">
			//require statements
			dojo.require( "dojo.widget.*" );
			dojo.require("dojo.widget.ContentPane");
			dojo.require("dojo.widget.SplitContainer");
			dojo.require("dojo.widget.LayoutContainer");
			
			//all dojo.require above this line
			dojo.hostenv.writeIncludes(); //makes debugging in Venkman possible
						
		</script>
		<!-- End Dojo JScript -->

</head>

<html>
<body>

   <div dojoType="LayoutContainer"
	layoutChildPriority='top-bottom'
	style="width: 100%; height: 100%;">
	
<div dojoType="ContentPane" layoutAlign="top">
Stuff at Top. 
</div>

<div dojoType="SplitContainer" orientation="vertical" sizerWidth="5" activeSizing="1" layoutAlign="client" style="height: 100%;">
   
      <div class="testclass1" dojoType="ContentPane" sizeMin="0" sizeShare="70" layoutAlign="client">
            The first pane with a div that has some padding and a border. 
      </div>
      
      <div class="testclass2" dojoType="ContentPane" sizeMin="0" sizeShare="70" layoutAlign="client">
            The second pane with a div that has another element in it. 
      </div>      
   
   </div>

</div>

</html>
</body>

Change History (8)

comment:1 Changed 13 years ago by dylan

Milestone: 0.5

comment:2 Changed 13 years ago by dylan

Owner: changed from anonymous to Dustin Machi

comment:3 Changed 12 years ago by bill

Milestone: 0.91.0
Owner: changed from Dustin Machi to koranteng

comment:4 Changed 12 years ago by Adam Peller

Component: WidgetsDijit

comment:5 Changed 12 years ago by bill

Owner: changed from koranteng to Adam Peller

Probably won't fix but will rather deprecate SplitContainer? for a new BorderLayout? widget. Still will leave this open until then.

comment:6 Changed 12 years ago by Adam Peller

Milestone: 1.01.1

comment:7 Changed 11 years ago by Adam Peller

Keywords: bordercontainer added

comment:8 Changed 11 years ago by Adam Peller

Resolution: worksforme
Status: newclosed

Sorry for the very, very long delay in addressing this bug. The new BorderContainer? does not seem to show the bleed-over you mention. Please reopen if this is still a problem with dijit.layout.BorderContainer?.

Note: See TracTickets for help on using tickets.