Ferveo has uploaded a new change for review.
https://gerrit.wikimedia.org/r/280685
Change subject: Stop any other tab animations when clicking on the tab button
......................................................................
Stop any other tab animations when clicking on the tab button
When quickly clicking on a tab (the same one or a different one) in the
toolbar the new animation is started immediately even though previously
triggered animations might still be running. This leads to potential
issues as reported in T106993 bug report.
Make sure to stop previous animation first before issuing a new one.
Additionally 'resize' trigger is under racing conditions when
expanding/collapsing tabs, and needs to be invoked explicitly on any
size-change event (cannot rely on the fact that the last issued animation
will trigger last).
Bug: T106993
Change-Id: I874dd7cb9f2fe96e3a6493508cbae4de56f7a6c0
---
M modules/jquery.wikiEditor.toolbar.js
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor
refs/changes/85/280685/1
diff --git a/modules/jquery.wikiEditor.toolbar.js
b/modules/jquery.wikiEditor.toolbar.js
index b731eaf..42993fd 100644
--- a/modules/jquery.wikiEditor.toolbar.js
+++ b/modules/jquery.wikiEditor.toolbar.js
@@ -621,10 +621,13 @@
$( this
).parent().parent().find( 'a' ).removeClass( 'current' );
$sections.css( 'overflow',
'hidden' );
if ( show ) {
- $section.removeClass(
'section-hidden' )
+ $section
+ .stop()
+ .removeClass(
'section-hidden' )
.attr(
'aria-expanded', 'true' )
.animate( {
opacity: 100.0 }, 'fast', 'linear', function () {
$( this
).addClass( 'section-visible' );
+
context.fn.trigger( 'resize' );
} );
$sections
.animate( {
height: $section.outerHeight() }, $section.outerHeight() * 2, function () {
@@ -634,6 +637,7 @@
$( this ).addClass(
'current' );
} else {
$sections
+ .stop()
.css( 'height',
$section.outerHeight() )
.animate( {
height: 0 }, $section.outerHeight() * 2, function () {
$( this
).css( { overflow: 'visible' } );
--
To view, visit https://gerrit.wikimedia.org/r/280685
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I874dd7cb9f2fe96e3a6493508cbae4de56f7a6c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Ferveo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits