Opened 11 years ago

Closed 11 years ago

#7644 closed defect (invalid)

dojo.animateProperty incorrectly assumes node has a display property

Reported by: afryer Owned by: Bryan Forbes
Priority: low Milestone: 1.3
Component: fx Version: 1.2beta
Keywords: Cc:
Blocked By: Blocking:

Description

When you use dojo.animateProperty with a css style rule in IE, the beforeBegin event handles attempts to set the display property of the css style rule node to "block". In IE, a css rule node has no 'display' property and IE throws an error when the display is attempted to be set. The beforeBegin handler needs a minor change to just check that a node has a display property before attempting to set it.

Attachments (2)

fx_patch.txt (516 bytes) - added by afryer 11 years ago.
patch for dojo/_base/fx.js that checks a node has a display property.
test_css_rule_fx.html (3.2 KB) - added by afryer 11 years ago.
test that shows a dojo.fx error when run in IE

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by afryer

Attachment: fx_patch.txt added

patch for dojo/_base/fx.js that checks a node has a display property.

Changed 11 years ago by afryer

Attachment: test_css_rule_fx.html added

test that shows a dojo.fx error when run in IE

comment:1 Changed 11 years ago by bill

Priority: highlow
severity: majorminor

Umm, you are trying to animate a property on a CSS rule like P { color: red; } instead of a regular DOM node like a <div>? Even if we apply this patch, does animateProperty() on a CSS rule do anything useful? I'm not following what you are trying to do.

comment:2 Changed 11 years ago by bill

Milestone: tbd1.3

marking these TBD tickets for 1.3 for now, although Bryan may recategorize

comment:3 Changed 11 years ago by dante

Resolution: invalid
Status: newclosed

marking as invalid - animateProperty is specifically for animating node properties. If you would like to use the animation API to do something like this, I would suggest creating a new dojo._Animation instance and use onAnimate to control your stylesheet rules individually.

Note: See TracTickets for help on using tickets.