Opened 7 years ago

Closed 7 years ago

#2101 closed defect (worksforme)

Bug with wipeIn.

Reported by: rmeschian@… Owned by: anonymous
Priority: high Milestone:
Component: lfx Version: 0.4
Keywords: Cc:
Blocked by: Blocking:

Description

Hi guys, if you run the code at the bottom with SHOW_BUG = false and you click on the click me div, you will notice that the information below it disappears(collapses). However, if you rerun the code with SHOW_BUG = true and you click on the click me div, you will notice that the data inside the div disappears but the div does not collapse. The only difference between the two is that the first instance makes nodes visible when first added by calling cloned.style.display='inherit'; where the second uses dojo.lfx.wipeIn(cloned, 500).play();

Here is the code:

<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

</head>


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


var SHOW_BUG = true;


dojo.require("dojo.event.*");
dojo.require("dojo.io.*");
dojo.require("dojo.widget.*");
dojo.require("dojo.crypto.MD5");
dojo.provide("dojo.crypto");
dojo.require("dojo.widget.TitlePane");
dojo.require("dojo.style");


dojo.hostenv.writeIncludes();
dojo.addOnLoad(initTest());


var idCount = 0;
function initTest() {

for(i = 0; i < 10; i++) {


var template = dojo.byId('graph-template');
var cloned = template.cloneNode(true);
idCount++;
set the new node's properties
cloned.id="cloned"+idCount;
dojo.dom.prependChild(cloned, template.parentNode);
if(SHOW_BUG)

dojo.lfx.wipeIn(cloned, 500).play();

else

cloned.style.display='inherit';

}


}



var open = true;
function wipe(node){

alert("hi");
if (this.open) {

dojo.lfx.wipeOut(node, 250).play();
this.open=false;

} else {

dojo.lfx.wipeIn(node, 250).play();
this.open=true;

}

}


</script>

<style>

#newGraphFormDivID {

border: 1px solid #ffb658;
float: left;
height: 50px;
overflow-y: hidden;;
width: 95%;

}

#container {

border: 1px solid #ffb658;
overflow-y: auto;
width: 95%;

}

#graph-template {

display: none;

}

body {

font-family: verdana, helvetica, sans-serif;
font-size: 11px;
line-height: 14px;
margin: 0px;
padding: 0px;

}

.graph-template-class {

margin: 5px;
border: 1px solid #ffb658;

}

.graph-template-title-class {

margin: 0px;
padding: 5px;
vertical-align:bottom;
font-weight: bold;
color: white;
font-size: 14px;
background-color: #ffb658;

}

.btnAdd {

display: block;
float: left;
margin: .5em 0 0 1em;

}

.icon {

float: left;
margin: 2px 5px 0px 2px;

}

/* group multiple buttons in a row */
.box {

display: block;
float: right;

}
.box .dojoButton {

float: left;
margin-left: 10px;

}

</style>

<body onload="initTest();">


<table>

<tr>

<td>Graph URI:</td>
<td><input id="newGraphURI_ID" type="text" size='40'></td>
<a href="javascript:void(0);" onClick="dojo.widget.byId('new-graph-dialog').show()"><img src="../images/button_plus.gif" width="16" height="16" border="0" alt="Delete"></a>

</tr>

</table>


<div id="container">




<div id="graph-template" class="graph-template-class" style="display: none;">

<div class="graph-template-title-class" onclick="wipe(this.parentNode.childNodes[3]); ">

<span>click me</span>

</div>


<TABLE border="0" cellspacing='3'>
<tr><td>asdfasdfsadf</td></tr>
<tr><td>asdfasdfsadf</td></tr>
<tr><td>asdfasdfsadf</td></tr>
<tr><td>asdfasdfsadf</td></tr>
<tr><td>asdfasdfsadf</td></tr>
</TABLE>


</div>


</div>


</body>

</html>

Attachments (1)

2101.html (2.5 KB) - added by bill 7 years ago.
revised testcase

Download all attachments as: .zip

Change History (3)

comment:1 Changed 7 years ago by bill

There were a number of strange things in the testcase:

  • call to addOnLoad() had parentheses wrong
  • you called the init function twice, once directly from <body> (which is unsupported)
  • you were doing stuff in <body> that should have been in <head>
  • unneeded dojo.require() calls, and calls for stuff that didn't exist, causing errors
  • etc.

I fixed all of those, and attached a new version of the testcase. Still not working quite right though, so apparently there's a bug in dojo. (But it doesn't show the problem you described either.)

Changed 7 years ago by bill

revised testcase

comment:2 Changed 7 years ago by bill

  • Component changed from General to lfx
  • Resolution set to worksforme
  • Status changed from new to closed

I fixed some more stuff w/the testcase itself. Now everything is working for me. (I've also recently made some changes to wipeIn() so that may have had an effect) Anyway, closing this bug.

Note: See TracTickets for help on using tickets.