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

RESOLVED WORKSFORME

Status

()

defect
RESOLVED WORKSFORME
13 years ago
13 years ago

People

(Reporter: felix9x, Unassigned)

Tracking

Trunk
PowerPC
macOS
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
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
Last Resolved: 13 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.