Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2612 closed defect (fixed)

Bug in 0.4.2 IE dealing with layouts

Reported by: [email protected] Owned by: sjmiles
Priority: high Milestone:
Component: General Version: 0.4.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by joose)

Loading widgets in IE gives this problem: DEBUG: [TypeError: 'currentStyle' is null or not an object] when calling loadWrapper$joinpoint$method on [object Object] with arguments [object Object] FATAL exception raised: 'currentStyle' is null or not an object.

Appears the variable currentStyle gets set to null (if there's isn't a style associated with the object, in this piece of code:

if ( {
	// IE branch
	dojo.html.getComputedStyle = function(/*HTMLElement|String*/node, /*String*/property, /*String*/value) {
		// summary
		// Get the computed style value for style "property" on "node" (IE).
		node = dojo.byId(node);  // FIXME: remove ability to access nodes by id for this time-critical function
		if(!node || !{return value;}
		// FIXME: standardize on camel-case input to improve speed
		return node.currentStyle[dojo.html.toCamelCase(property)]; // String
	// SJM: getComputedStyle should be abandoned and replaced with the below function.
	// All our supported browsers can return CSS2 compliant CssStyleDeclaration objects
	// which can be queried directly for multiple styles.
	dojo.html.getComputedStyles = function(/*HTMLElement*/node) {
		// summary
		// Get a style object containing computed styles for HTML Element node (IE).
		return node.currentStyle; // CSSStyleDeclaration

Attachments (1)

layout-patch.patch (612 bytes) - added by joose 15 years ago.
Fix for the bug

Download all attachments as: .zip

Change History (7)

Changed 15 years ago by joose

Attachment: layout-patch.patch added

Fix for the bug

comment:1 Changed 15 years ago by joose

Description: modified (diff)

comment:2 Changed 15 years ago by bill

Owner: changed from anonymous to sjmiles

comment:3 Changed 15 years ago by James Burke

(In [7716]) (merge from trunk) Refs #2612 Replace bad null-test, 'style' to 'currentStyle'

comment:4 Changed 15 years ago by alex


comment:5 Changed 15 years ago by sjmiles

Resolution: fixed
Status: newclosed

This was actually fixed in 7716.

comment:6 Changed 15 years ago by (none)

Milestone: 0.4.3

Milestone 0.4.3 deleted

Note: See TracTickets for help on using tickets.