Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When displaying a file field the tooltip states "Open file in new window" but the link open in the same window.
It seems the target attribute for the link is not set. Attached is a patch that adds the target.
Comment | File | Size | Author |
---|---|---|---|
#3 | bootstrap_issues-2794523.patch | 609 bytes | develdru |
#2 | after_patch.jpg | 121.38 KB | Akshay kashyap |
#2 | before_patch.jpg | 181.11 KB | Akshay kashyap |
filelink.patch | 604 bytes | Denis Danielyan | |
Comments
Comment #2
Akshay kashyap CreditAttribution: Akshay kashyap as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedI have review the patch, apply successfully and working fine. I have attached after and before images.
But in the FileLink.php file found some indentation issue.
Comment #3
develdru CreditAttribution: develdru as a volunteer and at OpenSense Labs commentedHi, I have created a patch file, please review.
thanks
Comment #4
develdru CreditAttribution: develdru as a volunteer and at OpenSense Labs commentedComment #6
markhalliwellComment #8
vidhatanand CreditAttribution: vidhatanand at OpenSense Labs commentedIs this committed to 3.x branch?
Comment #9
madmen CreditAttribution: madmen commented?
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedwindow.open('http://example.com/', '_blank');
.I am using this JQuery code to open a link in new tab , for that i had to reverse this patch first , as it led to ambiguity. It shouldn't be made fixed here , sometimes it is not required to open external link in new tab , help tooltip text should have been changed.Comment #11
markhalliwellwindow.open
is just plain old JavaScript, not jQuery.that is why they open in a new window (for UI/UX purposes). If, for whatever reason, you don't like this default behavior... you are certainly entitled to create a sub-theme and remove this attribute from each item's attribute array.