[browser] Opening links from the twitter web app doesn’t work

Bug #1159857 reported by Olivier Tilloy
6
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://m.twitter.com in the browser
 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

Revision history for this message
Olivier Tilloy (osomon) wrote :

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) {
        a = a || window.event;
        var b = a.target || a.srcElement, c, d, e;
        while (b && b.nodeName.toLowerCase() !== "a") b = b.parentNode;
        b && b.nodeName.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.preventDefault()));
    }

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.

Changed in manhattan:
importance: Undecided → High
Ugo Riboni (uriboni)
Changed in manhattan:
status: New → Confirmed
information type: Proprietary → Public
affects: manhattan → notes-app
affects: notes-app → webbrowser-app
Revision history for this message
Olivier Tilloy (osomon) wrote :

It turns out the issue was with links with a _blank target inside iframes. See bug #1188575 for details.

Changed in webbrowser-app:
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:webbrowser-app at revision 169, scheduled for release in webbrowser-app, milestone ubuntu-13.04-month-5

Changed in webbrowser-app:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package webbrowser-app - 0.20daily13.06.11-0ubuntu1

---------------
webbrowser-app (0.20daily13.06.11-0ubuntu1) saucy; urgency=low

  [ Olivier Tilloy ]
  * Ensure that the chrome won’t be automatically hidden while testing
    interaction with the toolbar. This should fix flaky autopilot tests.
  * More reliable way of asserting that a page has finished loading.
    This should make tests more robust.
  * Always format the suggestions as rich text, to ensure ampersands are
    not incorrectly escaped. (LP: #1187432)
  * Add translators comments for the keywords associated to HUD actions.
  * Enable multiple tabs in the browser. Only the basic functionality is
    in place, further iterations will refine the functionality and the
    visuals.
  * Make as many test cases as possible inherit from
    StartOpenRemotePageTestCaseBase. This should make them overall more
    robust by avoiding race conditions with the chrome automatically
    hiding when the homepage has finished loading.
  * Ensure the suggestions list is hidden when the panel is hidden. (LP:
    #1187871)
  * Open links with target="_blank" in a new tab.
  * Install custom click event handler on all frames as well as on the
    top-level document. (LP: #1159857, #1188575)
  * Escape some special characters before highlighting them. (LP:
    #1180521)
  * Add a webbrowser-app.pot target to the build system and integrate
    with dh_translations. Also internationalize the desktop file and
    strings in C++ code.

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 171
 -- Ubuntu daily release <email address hidden> Tue, 11 Jun 2013 05:03:08 +0000

Changed in webbrowser-app (Ubuntu):
status: New → Fix Released
Olivier Tilloy (osomon)
Changed in webbrowser-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.