Merge "Ensure most of the widget doesn't move when blur-validating"

This commit is contained in:
jenkins-bot 2021-03-01 20:39:06 +00:00 committed by Gerrit Code Review
commit 78260b97fe

View file

@ -205,7 +205,15 @@ NewTopicController.prototype.onSectionTitleChange = function () {
* @private
*/
NewTopicController.prototype.onSectionTitleBlur = function () {
var offsetChange,
offsetBefore = this.replyWidget.$element.offset().top;
this.checkSectionTitleValidity();
offsetChange = this.replyWidget.$element.offset().top - offsetBefore;
// Ensure the rest of the widget doesn't move when the validation
// message is triggered by a blur. (T275923)
window.scrollBy( 0, offsetChange );
};
/**