Jonas Kress (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/279150
Change subject: Fix history back ...................................................................... Fix history back ALso deletes unused code. Change-Id: I4b3d37a4218e1bd2ad628fa95fbbc3a43583528b --- M wikibase/queryService/ui/App.js 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui refs/changes/50/279150/1 diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js index c26af7f..d6a280d 100644 --- a/wikibase/queryService/ui/App.js +++ b/wikibase/queryService/ui/App.js @@ -60,7 +60,7 @@ * @property {boolean} * @private **/ - SELF.prototype._autoExecuteQuery = false; + SELF.prototype._isHistoryDisabled = false; /** * @property {Object} @@ -100,10 +100,6 @@ this._initRdfNamespaces(); this._initHandlers(); this._initResultBrowserMenu(); - - if( this._autoExecuteQuery ){ - $( '#execute-button' ).click(); - } }; /** @@ -177,8 +173,10 @@ location.hash = location.hash.replace( '#result#', '#' ); } + this._isHistoryDisabled = true; this._editor.setValue( decodeURIComponent( window.location.hash.substr( 1 ) ) ); this._editor.refresh(); + this._isHistoryDisabled = false; } }; @@ -478,6 +476,10 @@ * @private */ SELF.prototype._updateQueryUrl = function() { + if( this._isHistoryDisabled ){ + return; + } + var hash = encodeURIComponent( this._editor.getValue() ); if ( window.location.hash !== hash ) { -- To view, visit https://gerrit.wikimedia.org/r/279150 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b3d37a4218e1bd2ad628fa95fbbc3a43583528b Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits