From 0cbed52a3ba91259369b7b6ed6f2b34dd35b4844 Mon Sep 17 00:00:00 2001 From: mpl Date: Tue, 30 Jun 2015 00:53:58 +0200 Subject: [PATCH] UI: add title arg to history.replaceState According to https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history the second (=title) argument is ignored. However, in the chrome console I'm getting Uncaught TypeError: Failed to execute 'replaceState' on 'History': 2 arguments required, but only 1 present. errors so I figure it's worth fixing. Change-Id: I6b745503a68511c8010c41257b6790e7df9b8acb --- server/camlistored/ui/blob_item_container_react.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/camlistored/ui/blob_item_container_react.js b/server/camlistored/ui/blob_item_container_react.js index aac4c4ab0..7c8dd139a 100644 --- a/server/camlistored/ui/blob_item_container_react.js +++ b/server/camlistored/ui/blob_item_container_react.js @@ -379,7 +379,8 @@ cam.BlobItemContainerReact = React.createClass({ // NOTE: This method causes the URL bar to throb for a split second (at least on Chrome), so it should not be called constantly. updateHistory_: function() { - this.props.history.replaceState(cam.object.extend(this.props.history.state, {scroll:this.state.scroll})); + // second argument (title) is ignored on Firefox, but not optional. + this.props.history.replaceState(cam.object.extend(this.props.history.state, {scroll:this.state.scroll}), ''); }, fillVisibleAreaWithResults_: function() {