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:
Roan Kattouw 2013-06-19 21:32:03 -07:00 committed by Krinkle
parent 921a95de78
commit 3a5ec39ab5

View file

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