From 785543b5a6f36d3de830e1e8614335ae3a44a3b6 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 21 Jan 2025 10:53:52 +0100 Subject: [PATCH] [Glitch] Fix opening modals losing some location parameters Port 4ebdfed8ea7d16d203da73051ef26bbcdeb63681 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/modal_root.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }); } }