Jonas Kress (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/276736

Change subject: When location search equals '?new' editor content is not being 
restored. 
......................................................................

When location search equals '?new' editor content is not being restored. 

Bug: T128851
Change-Id: Id08b68e383467299db9dcc7fb31dca979283ff25
---
M wikibase/queryService/ui/App.js
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/36/276736/1

diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index c3ce269..b7f726c 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -162,7 +162,6 @@
         **/
        SELF.prototype._initQuery = function() {
                if ( window.location.hash !== '' ) {
-
                        if( location.hash.indexOf( '#result#' ) === 0 ){
                                location.hash = location.hash.replace( 
'#result#', '#' );
                        }
@@ -171,6 +170,9 @@
                        this._editor.refresh();
                }else{
 
+                       if( location.search === ( '?new' )){
+                               return;
+                       }
                        this._editor.restoreValue();
                }
        };

-- 
To view, visit https://gerrit.wikimedia.org/r/276736
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id08b68e383467299db9dcc7fb31dca979283ff25
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

Reply via email to