mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 09:40:41 +00:00
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:
parent
6bece9bf06
commit
381b7be7d8
|
@ -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 );
|
||||
} );
|
||||
|
||||
|
|
Loading…
Reference in a new issue