Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/130804
Change subject: Always fix up selection after ce.Surface#focus ...................................................................... Always fix up selection after ce.Surface#focus Otherwise we get a broken selection in surface widgets. The bug which this.focusing was introduced to fix has been fixed elsewhere. Bug: 64399 Change-Id: Ie996812ccd6166f6cc348985271d720c9c484fa5 --- M modules/ve/ce/ve.ce.Surface.js 1 file changed, 1 insertion(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/04/130804/1 diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 6c250ee..fcdbae9 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -43,7 +43,6 @@ this.clipboardId = String( Math.random() ); this.renderLocks = 0; this.dragging = false; - this.focusing = false; this.relocating = false; this.selecting = false; this.resizing = false; @@ -350,7 +349,6 @@ * function will also reapply the selection, even if the surface is already focused. */ ve.ce.Surface.prototype.focus = function () { - this.focusing = true; // Focus the documentNode for text selections, or the pasteTarget for focusedNode selections if ( this.focusedNode ) { this.$pasteTarget[0].focus(); @@ -360,9 +358,6 @@ // but onDocumentFocus won't fire so restore the selection here too. this.onModelSelect( this.surface.getModel().getSelection() ); } - setTimeout( ve.bind( function () { - this.focusing = false; - }, this ) ); // onDocumentFocus takes care of the rest }; @@ -399,7 +394,7 @@ * @fires focus */ ve.ce.Surface.prototype.onDocumentFocus = function () { - if ( !this.dragging && !this.focusing ) { + if ( !this.dragging ) { // If the document is being focused by a non-mouse user event, FF may place // the cursor in a non-content offset (i.e. just after the document div), so // find the first content offset instead. -- To view, visit https://gerrit.wikimedia.org/r/130804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie996812ccd6166f6cc348985271d720c9c484fa5 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: wmf/1.24wmf2 Gerrit-Owner: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Esanders <esand...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits