From 4ebdfed8ea7d16d203da73051ef26bbcdeb63681 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 21 Jan 2025 10:53:52 +0100 Subject: [PATCH] Fix opening modals losing some location parameters (#33670) --- app/javascript/mastodon/components/modal_root.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/components/modal_root.jsx b/app/javascript/mastodon/components/modal_root.jsx index b0d88fe8f9..1eae0819af 100644 --- a/app/javascript/mastodon/components/modal_root.jsx +++ b/app/javascript/mastodon/components/modal_root.jsx @@ -118,9 +118,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 }); } }