Avoid flashes: late debounce causes annoying flashes

Validate elements are updated before replacing elements in the DOM.

Bug: T112168
Change-Id: Ia9556b0b9e9f5b0132be5a61a2cde7bb4dc5606e
This commit is contained in:
eranroz 2015-09-11 13:36:13 +03:00 committed by Esanders
parent 6bece9bf06
commit 381b7be7d8

View file

@ -34,6 +34,8 @@
badgeIcon: 'speechBubble',
links: links
} );
// avoid late debouncedUpdateThemeClasses
mw.echo.ui.messageWidget.debouncedUpdateThemeClasses();
$existingMessageLink.replaceWith( mw.echo.ui.messageWidget.$element );
}
@ -48,6 +50,9 @@
},
links: links
} );
// avoid late debouncedUpdateThemeClasses
mw.echo.ui.alertWidget.debouncedUpdateThemeClasses();
$existingAlertLink.replaceWith( mw.echo.ui.alertWidget.$element );
} );