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

This ensures click events are interrupted on other controls.

Bug: T275923
Change-Id: Ib73d17a965f1fb7e2bc4870bdbb568a9f6d071d3
This commit is contained in:
Ed Sanders 2021-02-28 15:00:12 +00:00
parent 8bb5eea999
commit c04a4c5c8f

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 );
};
/**