Skip to content

Commit

Permalink
Fix browser back on puzzle pages.
Browse files Browse the repository at this point in the history
For some reason, when a Sheets URL is loaded with ?...#gid=0, it
redirects to ?...&gid=0#gid=0; this redirect puts a spurious entry in
the navigation history, which breaks the first back button press.
Embedding the final URL fixes the back button.

Fixes deathandmayhem#2162
  • Loading branch information
jpd236 committed Jun 19, 2024
1 parent 3bc7a14 commit f5d84ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imports/client/components/DocumentDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const GoogleDocumentDisplay = ({
let icon: IconDefinition;
switch (document.value.type) {
case "spreadsheet":
url = `https://docs.google.com/spreadsheets/d/${document.value.id}/edit?ui=2&rm=embedded#gid=0`;
url = `https://docs.google.com/spreadsheets/d/${document.value.id}/edit?ui=2&rm=embedded&gid=0#gid=0`;
deepUrl = `googlesheets://${url}`;
title = "Sheet";
icon = faTable;
Expand Down

0 comments on commit f5d84ad

Please sign in to comment.