home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1271009214

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/pull/1838#issuecomment-1271009214 https://api.github.com/repos/simonw/datasette/issues/1838 1271009214 IC_kwDOBm6k_c5Lwg-- 9599 2022-10-07T02:01:07Z 2022-10-07T02:01:07Z OWNER

The argument that has always convinced me NOT to use target="_blank" (even for links like this one) is that it breaks browser expectations.

If you click a link with `target="_blank" on it you get a new browser window... with a disabled back button. You have to then know to close that browser window in order to return to the previous page - as opposed to hitting the "back" button like usual.

You'll note that Datasette doesn't use target="_blank" even on URLs presented in database tables - like these ones: https://latest.datasette.io/fixtures/roadside_attractions

So I'm very firmly in the anti-target-blank camp!

This is the kind of change which I'd suggest implementing as a plugin. datasette-external-links-new-windows could run a bit of JavaScript on every page that looks for <a href="..."> elements that link to off-domain pages and adds target="_blank" to them via the DOM.

That way people who like target="_blank" can have it!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1400494162  
Powered by Datasette · Queries took 1.031ms · About: github-to-sqlite