mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 08:23:52 +00:00
Merge "Ensure most of the widget doesn't move when blur-validating"
This commit is contained in:
commit
78260b97fe
|
@ -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 );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue