Skip to:
Content

BuddyPress.org

Opened 5 years ago

Last modified 2 years ago

#6146 new enhancement

URL xprofile field should have target=_blank

Reported by: sooskriszta Owned by:
Milestone: Awaiting Contributions Priority: low
Severity: minor Version: 1.0
Component: Extended Profile Keywords: needs-patch
Cc:

Description

In the frontend, clicking on a URL field (linked by default) opens the target link in same window. Since this is likely to be a separate website, most website admins will probably want to change this behavior.

The patch will be simple edit of a template file. Happy to submit that if core team feels it is something worth including.

Change History (6)

#1 @boonebgorges
5 years ago

  • Keywords 2nd-opinion added

I'm not a big fan of target=_blank. Users should be able to decide whether they want a link opened in a new window. I'd be OK with one of the following:

  • filter the attributes used to build the link, so that 'target=_blank' could be added with a filter
  • have a specific "bp_xprofile_url_target_blank" filter for URL fields (or something like that), which would default to false
  • maybe, just maybe, a UI toggle for the admin, which would default to unchecked. (Gasp! Usually I don't like adding toggles, but "Open in a new window" seems pretty transparent and potentially useful here.)

but I definitely would not want to force it, or have it be the default.

I'd be glad to hear others' thoughts.

#2 @johnjamesjacoby
5 years ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to Future Release
  • Priority changed from normal to low
  • Severity changed from normal to minor
  • Version set to 1.0

Agree on not forcing it. Having a new tab open unexpectedly is equally as jarring as having the current tab load something you didn't want it to, only (in my opinion) tapping back is more convenient than locating and closing a new tab.

Rejigging some ticket attributes to keep it active but extremely low priority, as I can see more discussion happening and maybe even us changing our minds a few years from now.

#3 @boonebgorges
5 years ago

  • Keywords needs-patch added

Rejigging some ticket attributes to keep it active but extremely low priority, as I can see more discussion happening and maybe even us changing our minds a few years from now.

Yes. If someone stepped up with a ready-to-go patch, it'd probably make the case more convincing :-D

#4 @hnla
5 years ago

These aspects are User Behaviour it's considered bad practise for the web developer to try and make these decisions on behalf of the end user.

Jakob Nielson says: http://www.nngroup.com/articles/the-top-ten-web-design-mistakes-of-1999/

#5 @hnla
5 years ago

For a long time the accepted approach if this had to be done and to avoid the attr directly on an element was to use a class token to attach a behaviour to so that JS handled this when it saw a specific token i.e class="new-win"

If we do - and why not provide option - I would have thought passing something as a arg is choice, I see 2.3 as the season of the parse_args expansion :)

#6 @tw2113
2 years ago

I feel this one should probably be closed as wontfix, unless someone provides a really solid argument to include a solution.

Note: See TracTickets for help on using tickets.