mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
mw.ViewPageTarget: Use native .focus() rather than jQuery's .focus()
jQuery's implementation does some sort of traversal, so on large pages it took 300-400ms just to focus the document node. Change-Id: I0de95d8800a1aedeb19b27d204dfd8fd08cec533
This commit is contained in:
parent
921a95de78
commit
3a5ec39ab5
|
@ -354,7 +354,7 @@ ve.init.mw.ViewPageTarget.prototype.onLoad = function ( doc ) {
|
|||
this.restoreScrollPosition();
|
||||
this.restoreEditSection();
|
||||
this.setupBeforeUnloadHandler();
|
||||
this.$document.focus();
|
||||
this.$document[0].focus();
|
||||
this.activating = false;
|
||||
}
|
||||
};
|
||||
|
@ -634,7 +634,7 @@ ve.init.mw.ViewPageTarget.prototype.onToolbarMwMetaButtonClick = function () {
|
|||
ve.init.mw.ViewPageTarget.prototype.onToolbarEditNoticesToolClick = function () {
|
||||
this.$toolbarEditNotices.fadeToggle( 'fast' );
|
||||
this.$toolbarBetaNotice.fadeOut( 'fast' );
|
||||
this.$document.focus();
|
||||
this.$document[0].focus();
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -646,7 +646,7 @@ ve.init.mw.ViewPageTarget.prototype.onToolbarEditNoticesToolClick = function ()
|
|||
ve.init.mw.ViewPageTarget.prototype.onToolbarBetaNoticeToolClick = function () {
|
||||
this.$toolbarBetaNotice.fadeToggle( 'fast' );
|
||||
this.$toolbarEditNotices.fadeOut( 'fast' );
|
||||
this.$document.focus();
|
||||
this.$document[0].focus();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue