Closed Bug 337426 Opened 15 years ago Closed 14 years ago

-moz-inline-block behavior lost after element is changed through dom

Categories

(Core :: Layout: Block and Inline, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: felix9x, Unassigned)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3

Elements that have display:-moz-inline-block lose their inline  behaviour after the element is modified through dom methods in javascript.  For example elements having appeared inline will all of a sudden behave like a block after they are modified with appendChild for example. I confirm this with a test case I add below:


Reproducible: Always





<html>
<head><title>Test how element loses its inline-block behaviour</title>

<script>

	function changeElem( ) {
		document.getElementById( 'e' ).appendChild( document.createTextNode( '' ) );
	}

</script>
</head>
<body>

<table style="width:100%">
<tr>
<td>
 <div id="e" style="display:-moz-inline-block;border:1px solid black;" >Inside div</div> Outside div
</td>
</tr>
</table>

<a href="javascript:void(0)" onclick="changeElem( )" >Change element through DOM</a>
</body>
</html>
Worksforme on the trunk (but I see it in 1.5 and 2.0), maybe thanks to bug 314878?
Blocks: inline-block
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Component: DOM → Layout: Block and Inline
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.