diff --git a/app/javascript/flavours/glitch/components/modal_root.jsx b/app/javascript/flavours/glitch/components/modal_root.jsx index bfe9efea06..9bbe23ce0c 100644 --- a/app/javascript/flavours/glitch/components/modal_root.jsx +++ b/app/javascript/flavours/glitch/components/modal_root.jsx @@ -123,9 +123,9 @@ class ModalRoot extends PureComponent { } _ensureHistoryBuffer () { - const { pathname, state } = this.history.location; + const { pathname, search, hash, state } = this.history.location; if (!state || state.mastodonModalKey !== this._modalHistoryKey) { - this.history.push(pathname, { ...state, mastodonModalKey: this._modalHistoryKey }); + this.history.push({ pathname, search, hash }, { ...state, mastodonModalKey: this._modalHistoryKey }); } }