mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
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:
parent
8bb5eea999
commit
c04a4c5c8f
|
@ -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