This project is archived and is in readonly mode.

#511 ✓invalid
Bryan J Swift

Opera 9.62 breaks height calculations

Reported by Bryan J Swift | December 5th, 2008 @ 10:38 PM | in 2.0 (closed)

While attempting to debug a problem in my code where elements were expanding after collapse to a shorter height than their original height I stepped into the MooTools source a bit and noticed this bit:

if (Browser.Engine.presto || (Browser.Engine.trident && !$chk(parseInt(result)))){
	if (property.test(/^(height|width)$/)){
		var values = (property == 'width') ? ['left', 'right'] : ['top', 'bottom'], size = 0;
			size += this.getStyle('border-' + value + '-width').toInt() + this.getStyle('padding-' + value).toInt();
		}, this);
		return this['offset' + property.capitalize()] - size + 'px';
	if ((Browser.Engine.presto) && String(result).test('px')) return result;
	if (property.test(/(border(.+)Width|margin|padding)/)) return '0px';

Knowing that 9.62 was a recent release I downloaded the latest version being detected in MooTools 1.2.1 (the version used in this test) which was 9.60 and tested the behavior and it worked fine and in 9.62 if I remove the check for presto the elements collapse and expand to the correct height. I just tested the behavior in 9.61 and it's also broken.

Presumably this is also true for width calculations.

All testing was done on Mac OS 10.4.11

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket