Bug #1643
closedWStackedWidget with animation fails on setCurrentIndex() when previous animation/transition is not yet complete
Description
The display is not updated to reflect the internal state of WStackedWidget if setCurrentIndex() is called while an animation from a previous setCurrentIndex() is ongoing. I believe that the problem is related to visibility of animateChild(). For the affected application, this patch to Wt 3.2.3 seemed to work:
diff -u a/src/js/WStackedWidget.js b/src/js/WStackedWidget.js
--- a/src/js/WStackedWidget.js
+++ b/src/js/WStackedWidget.js
@@ -190,7 +190,7 @@ WT_DECLARE_WT_MEMBER
*/
if ($(from).hasClass("in")) {
$(from).one(animationEventEnd, function() {
- animateChild(child, effects, timing, duration, style);
+ Wt.WT.WStackedWidget.prototype.animateChild(child, effects, timing, duration, style);
});
return;
}
Updated by Wim Dumon almost 12 years ago
- Status changed from New to Feedback
We cannot reproduce this. Can you create a minimal test case please?
BR,
Wim.
Updated by Bruce Toll almost 12 years ago
Thanks for following-up. An easy way to demo this problem is to modify the wt-homepage example. If you increase the duration of the animation from 250 ms to 3000 ms (line 127 in Home.C in v3.2.3), it should be reproducible if you rapidly switch between menu items with the mouse
Without the patch, you should see errors on the javascript console (animateChild is not defined) and the correct menu state will not be displayed.
Thanks for a great product!
Updated by Wim Dumon almost 12 years ago
- Status changed from Feedback to Resolved
Fixed in internal branch, will appear in git soon.
Wim.
Updated by Koen Deforche almost 12 years ago
- Status changed from Resolved to Closed
- Assignee set to Wim Dumon
- Target version set to 3.3.0