mitoc-trips icon indicating copy to clipboard operation
mitoc-trips copied to clipboard

Suggestion: open markdown cheat sheet in new window/tab

Open hvannieuwenh opened this issue 2 years ago • 2 comments

On the trip creation page, is it possible to have the markdown cheat sheet linked below the description box open in a new window or tab? Currently it opens in the same and causes the user to lose whatever progress they had made on the trip creation page. Asking for a friend... :)

hvannieuwenh avatar Jul 13 '23 18:07 hvannieuwenh

Hey, thanks for the suggestion!

So, it's fairly easy in HTML to force a given link to be opened in a new tab -- you just set target=_blank on the link. However, forcing new tabs on users is generally frowned upon -- since users may have instead wanted to open the link in the same tab/window. There are no links on MITOC Trips that forcefully open in a new page.

What I can (and probably should) do, though, is make it such that navigating away from the page (with some form content filled out) asks you if you're sure you want to leave & discard the changes. Nobody likes to lose their work, and this is pretty easy to do (it also makes it such that people who haven't yet filled out the form can quickly navigate to the link, then go "back" when done).

Would the above work for you?

In the meantime, you can always open any given link a new tab by holding Command or Ctrl before clicking (or using the middle mouse button on most mice).

DavidCain avatar Jul 14 '23 01:07 DavidCain

Yes, this sounds like a reasonable solution! Thank you!

hvannieuwenh avatar Jul 14 '23 12:07 hvannieuwenh