Opened 12 years ago

Closed 12 years ago

#3830 closed defect (duplicate)

Dialog _duration = 0 not working in some browsers

Reported by: guest Owned by: anonymous
Priority: high Milestone: 1.1
Component: General Version: 0.9
Keywords: Dialog duration Cc:
Blocked By: Blocking:

Description

Setting _duration = 0, does not work with Opera, Epiphany and sometimes with Firefox

Change History (4)

comment:1 in reply to:  description Changed 12 years ago by guest

More info

Dojo version: dojo-0.9.0beta

OS: Linux Ubuntu 7.04

Browser: Opera 9.21.641, Epiphany 2.18.1, Firefox 2.0.0.5

Mail: fermo111@…

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Dialog Widget Dojo Tests</title>
<style type="text/css">
	@import "../../lib/dojo/dojo/resources/dojo.css";
	@import "../../lib/dojo/dijit/themes/tundra/tundra.css";
	@import "../../lib/dojo/dijit/tests/css/dijitTests.css";
	table { border: none; }
</style>		
<script type="text/javascript" djConfig="parseOnLoad: true, isDebug: true" src="../../lib/dojo/dojo/dojo.js"></script>
<script type="text/javascript">
	dojo.require("dijit.Dialog");
	dojo.require("dijit.form.Button");
	dojo.require("dojo.parser");	// scan page for widgets and instantiate them
</script>

<script type="text/javascript">
var dlg;
function createDialog() {
	if (!dlg) {
		var pane = dojo.byId ('dlg');
		pane.style.width = "300px"; 	
		dlg = new dijit.Dialog ({title: "Programatic Dialog Creation", _duration: 0},pane);
	}
	dlg.show();
}

</script>
</head>

<body class="tundra">
<button dojoType="dijit.form.Button" onclick="createDialog()">Programatic Dialog</button>
<div id="dlg" style="display: none;">
	<form>
	<input>
	<br>
	<button>hello</button>
	<br>
	<select>
		<option>Lorem</option>
		<option>ipsum</option>
		<option>dolor</option>
		<option>sit</option>
		<option>amet</option>
	</select>
	</form>
	<p>
	Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
	semper sagittis velit. Cras in mi. Duis porta mauris ut ligula. Proin
	porta rutrum lacus. Etiam consequat scelerisque quam. Nulla facilisi.
	Maecenas luctus venenatis nulla. In sit amet dui non mi semper iaculis.
	Sed molestie tortor at ipsum. Morbi dictum rutrum magna. Sed vitae
	risus.
	</p>
</div>

</body>
</html>


comment:2 Changed 12 years ago by bill

Milestone: 1.1

Not sure why that's happening (a bug in the animation libraries?), but note that _duration has an _ meaning that it's a private variable. Still I can take a look. Not though that Opera and Epiphany aren't currently supported.

comment:3 Changed 12 years ago by dante

(want to close as wontfix/fixed): _duration is now public in Dialog (duration), and animation duration cannot be 0 (no time?) ... setting value to 1 popups dialog instantly, but still creates the animations. The alternative is to have a 'toggle' animation defined, OR to use raw styles in show/hide (in the event of duration=0) ... tested with duration=1 (and a simple if (!this.duration) { this.duration=1; } in postCreate) and it still runs very fast (visually seamless) ...

comment:4 Changed 12 years ago by bill

Resolution: duplicate
Status: newclosed

Ah, Dante is right. See #3827. This is basically a duplicate.

Note: See TracTickets for help on using tickets.