Closed Bug 853456 Opened 7 years ago Closed 7 years ago

target=_blank doesn't work with <img> links

Categories

(Firefox for Android :: Web Apps, defect, P1)

20 Branch
All
Android
defect

Tracking

()

VERIFIED FIXED
Firefox 23
Tracking Status
firefox23 --- verified
fennec - ---

People

(Reporter: eviljeff, Assigned: wesj)

References

()

Details

(Keywords: reproducible, Whiteboard: [A4A])

Attachments

(1 file)

from an email:

it seems that there is a bug that only affects webapps on Android, whereby hyperlinks that contain an img do not open externally. 

Works (opens externally):
<div class="image"><a href="{href}" target="_blank">{text}</a></ div>

Doesn't work (opens internally):
<div class="image"><a href="{href}" target="_blank"><img src="{src}"/></a></div>

This issue only appears to affect the app runtime on Android, as it works fine on the Firefox beta browser on Android and on Firefox OS full screen web apps.
Putting on tracking cause this breaks compat across apps on platforms and touches on target=blank functionality, which is important for opening content outside of the app.
Whiteboard: [A4A]
Added a URL to an app that exhibits this issue.  Try the video links.
This is compatibility bustage in comparison to FxOS.

==> P1
Priority: -- → P1
Keywords: reproducible
Assignee: nobody → wjohnston
tracking-fennec: --- → ?
tracking-fennec: ? → -
Explanation is needed here.

This was marked tracking on web apps initiative, so I do not understand why this is not being tracked on the fennec side.
Flags: needinfo?(blassey.bugs)
It is being tracked for web apps, there for does not need to be tracked for fennec
Flags: needinfo?(blassey.bugs)
Blocks: 862014
Attached patch PatchSplinter Review
This walks the tree to find links rather than just using event.target.
Attachment #739885 - Flags: review?(mark.finkle)
Comment on attachment 739885 [details] [diff] [review]
Patch

>+    while(target && !(target instanceof HTMLAnchorElement)) {

nit: add a space
  while (

>     let uri = Services.io.newURI(target.href,
>                                  target.ownerDocument.characterSet,
>                                  null);

Not your change, but could you make this all one line?
Attachment #739885 - Flags: review?(mark.finkle) → review+
Forgot about the nits. Wil push a follow up.

https://hg.mozilla.org/integration/mozilla-inbound/rev/3c0e77a706f4
https://hg.mozilla.org/mozilla-central/rev/3c0e77a706f4
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Looks like the m-i commit for the follow up had the wrong bug number.
Anyways, merged to m-c here:

https://hg.mozilla.org/mozilla-central/rev/ef755a443f3c
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.