Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/316014
Change subject: Check previousSelection is set before setting it ...................................................................... Check previousSelection is set before setting it Bug: T147232 Change-Id: I39edff5cee4351c60c43fda2c5ad9ab4bf0dca7b --- M src/ui/inspectors/ve.ui.AnnotationInspector.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/14/316014/1 diff --git a/src/ui/inspectors/ve.ui.AnnotationInspector.js b/src/ui/inspectors/ve.ui.AnnotationInspector.js index 2c20ff9..ace79aa 100644 --- a/src/ui/inspectors/ve.ui.AnnotationInspector.js +++ b/src/ui/inspectors/ve.ui.AnnotationInspector.js @@ -271,7 +271,9 @@ if ( !remove ) { if ( data.action !== 'done' ) { surfaceModel.popStaging(); - surfaceModel.setSelection( this.previousSelection ); + if ( this.previousSelection ) { + surfaceModel.setSelection( this.previousSelection ); + } return; } if ( this.initialSelection.isCollapsed() ) { -- To view, visit https://gerrit.wikimedia.org/r/316014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39edff5cee4351c60c43fda2c5ad9ab4bf0dca7b Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits