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
This commit is contained in:
mpl 2015-06-30 00:53:58 +02:00
parent 329244af79
commit 0cbed52a3b
1 changed files with 2 additions and 1 deletions

View File

@ -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() {