PDA

View Full Version : [CLOSED] [4.2.1 beta] Issues with Ext.dom.Element's frame, switchOff, puff, ghost, highlight



Daniil
29 Apr 2013, 8:10 AM
REQUIRED INFORMATION

Ext version tested:

Ext 4.2.1 beta

Browser versions tested against:

Any

DOCTYPE tested against:

Any

Description:

The Ext.dom.Element's frame, switchOff and puff methods don't extract listeners from a config.
The highlight method seems to be not working if pass some parameters. If call it without parameters if works.
There is still an old bug (http://www.sencha.com/forum/showthread.php?202531) with the ghost method. It doesn't work if pass a "listeners" option with a config.

Steps to reproduce the problem:

Run the scripts

The result that was expected:

The "beforeanimate" and "afteranimate" messages in the console for the frame, switchOff and puff methods.
The highlight method works with custom parameters.
The ghost method works even if pass a "listeners" config.

The result that occurs instead:

Nothing in the console.
The highlight method doesn't work with custom parameters, i.e. doesn't cause any animation
The ghost method doesn't work if pass a "listeners" config. i.e. doesn't cause any animation.

Test Case:


<div id="div1" style="height: 100px; width: 100px; background-color: green;"></div>

frame ("beforeanimate" and "afteranimate" listeners are not triggered)


Ext.fly("div1").frame("red", 1, {
duration: 3000,
listeners: {
beforeanimate: {
fn: function () {
console.log("beforeanimate");
}
},
afteranimate: {
fn: function () {
console.log("afteranimate");
}
}
}
})

switchOff ("beforeanimate" and "afteranimate" listeners are not triggered)


Ext.fly("div1").switchOff({
duration: 3000,
listeners: {
beforeanimate: {
fn: function () {
console.log("beforeanimate");
}
},
afteranimate: {
fn: function () {
console.log("afteranimate");
}
}
}
})

puff ("beforeanimate" and "afteranimate" listeners are not triggered)


Ext.fly("div1").puff({
duration: 3000,
listeners: {
beforeanimate: {
fn: function () {
console.log("beforeanimate");
}
},
afteranimate: {
fn: function () {
console.log("afteranimate");
}
}
}
})

highlight (doesn't work with custom parameters)


Ext.fly("div1").highlight("red", {
duration: 3000,
attr: "backgroundColor", // tried with "background-color" as well
listeners: {
beforeanimate: {
fn: function () {
console.log("beforeanimate");
}
},
afteranimate: {
fn: function () {
console.log("afteranimate");
}
}
}
});

ghost (doesn't work if pass a "listeners" option)


Ext.fly("div1").ghost("b", {
duration: 3000,
listeners: {
beforeanimate: {
fn: function () {
console.log("beforeanimate");
}
},
afteranimate: {
fn: function () {
console.log("afteranimate");
}
}
}
});

*EDIT BY SLEMMON
tested in 4.1.1, 4.1.3, 4.2.0.663, and 4.2.1.789

slemmon
29 Apr 2013, 9:46 AM
Thanks for the report! I have opened a bug in our bug tracker.

Daniil
29 Apr 2013, 9:19 PM
I have ran more tests.

It turns out that there is the same problem with the switchOff and puff methods.

Also there are the problems with the ghost and highlight methods.

I have updated the thread's title and the original post. If you have a chance, please review.

Please let me know if it is acceptable.