mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 02:00:57 +00:00
ReplyWidget: Defer scrollElementIntoView
Prevents VE from cancelling this scroll, and so not full scrolling the widget into view. Change-Id: I5b242fa2c60b87a52935f86f95d6c0efde2b74bc
This commit is contained in:
parent
86485dfc83
commit
d5450abe39
|
@ -237,8 +237,13 @@ CommentController.prototype.focus = function () {
|
|||
};
|
||||
|
||||
CommentController.prototype.showAndFocus = function () {
|
||||
this.replyWidget.scrollElementIntoView( { padding: scrollPadding } );
|
||||
var commentController = this;
|
||||
this.focus();
|
||||
// Calling can trigger a scroll-into-view withing VE, so wait for this to
|
||||
// happen so it doesn't cancel our scrolling of the whole widget into view
|
||||
setTimeout( function () {
|
||||
commentController.replyWidget.scrollElementIntoView( { padding: scrollPadding } );
|
||||
} );
|
||||
};
|
||||
|
||||
CommentController.prototype.teardown = function ( abandoned ) {
|
||||
|
|
Loading…
Reference in a new issue