[browser] Opening links from the twitter web app doesn’t work
Bug #1159857 reported by
Olivier Tilloy
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
webbrowser-app |
Fix Released
|
High
|
Olivier Tilloy | ||
webbrowser-app (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
(originally reported as bug #1129281)
Steps to reproduce:
1) open http://
2) log in to a twitter account
3) find a tweet that has a hyperlink
4) click the hyperlink
Expected result: the hyperlink is opened.
Current result: nothing happens.
Related branches
lp:~osomon/webbrowser-app/open-blank-in-new-tab-from-frame
- Günter Schwann (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 110 lines (+57/-20)3 files modifiedsrc/Ubuntu/Browser/hyperlinks.js (+15/-4)
tests/autopilot/webbrowser_app/tests/http_server.py (+20/-0)
tests/autopilot/webbrowser_app/tests/test_tabs.py (+22/-16)
Changed in manhattan: | |
status: | New → Confirmed |
information type: | Proprietary → Public |
affects: | manhattan → notes-app |
affects: | notes-app → webbrowser-app |
Changed in webbrowser-app: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
As noted in bug #1129281, it looks like twitter does additional processing of hyperlinks in tweets. According to the webkit web inspector, an event listener is installed on the document (from https:/ /platform. twitter. com/widgets. js) which does the following:
function p(a) { toLowerCase( ) !== "a") b = b.parentNode; toLowerCase( ) === "a" && b.href && (c = b.href.match(f), c && (e = o(b.href), e = e.replace( /^http[ :]/, "https:"), e = e.replace(/^\/\//, "https://"), q(e, b), a.returnValue = !1, a.preventDefault && a.preventDefaul t()));
a = a || window.event;
var b = a.target || a.srcElement, c, d, e;
while (b && b.nodeName.
b && b.nodeName.
}
So, for some reason that I don’t fully understand yet, this listener cancels the event without stopping further propagation of it (see https:/ /developer. mozilla. org/en- US/docs/ DOM/event. preventDefault). I suspect this listener is what prevents the custom handler (see fix for bug #1129281) from getting the click event. Needs more investigation.