Matěj Suchánek has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/356071 )
Change subject: Don't show suggestions for qualifiers/references of new statements ...................................................................... Don't show suggestions for qualifiers/references of new statements When you focus a new qualifier of a new statement, the suggestions are same as for the new statement. This patch doesn't fix the problem but suppresses the wrong suggestions. Bug: T102324 Change-Id: I3ea5fca4ecb88d5c068f97a08d8f455e4b9ec74f --- M modules/ext.PropertySuggester.EntitySelector.js 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PropertySuggester refs/changes/71/356071/1 diff --git a/modules/ext.PropertySuggester.EntitySelector.js b/modules/ext.PropertySuggester.EntitySelector.js index c2c5c8c..47e79d3 100644 --- a/modules/ext.PropertySuggester.EntitySelector.js +++ b/modules/ext.PropertySuggester.EntitySelector.js @@ -92,7 +92,8 @@ _useSuggester: function () { var entity = this._getEntity(); - return this.options.type === 'property' && entity && entity.getType() === 'item'; + return this.options.type === 'property' && entity && entity.getType() === 'item' + && this._getPropertyContext() !== null; }, /** @@ -149,14 +150,16 @@ */ _getPropertyContext: function () { if ( this._isInNewStatementView() ) { - return 'item'; + if ( !this._isQualifier() && !this._isReference() ) { + return 'item'; + } } else if ( this._isQualifier() ) { return 'qualifier'; } else if ( this._isReference() ) { return 'reference'; - } else { - return null; } + + return null; }, /** -- To view, visit https://gerrit.wikimedia.org/r/356071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ea5fca4ecb88d5c068f97a08d8f455e4b9ec74f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PropertySuggester Gerrit-Branch: master Gerrit-Owner: Matěj Suchánek <matejsuchane...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits