REGRESSION: non direct links nolonger open

Bug #1275855 reported by Dave Morley
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
webbrowser-app
Fix Released
Medium
Unassigned

Bug Description

I noticed this first on google plus. But it seems facebook and twitter are the same.

If there is a post that say: Click here to find out more (like omg!ubuntu does) then it fails to open the link. However if the link is http://ubuntu.com then the link opens.

Dave Morley (davmor2)
tags: added: maguro mako r160 regression
summary: - non direct links nolonger open
+ REGRESSION: non direct links nolonger open
Revision history for this message
Oliver Grawert (ogra) wrote :

using the BBC webapp this seems to work for me:

1) open the app
2) scroll down to "woody allens legacy" (i assume that article will be gone in a few days though)
3) open the article, there is an "open letter to the public" link in the second text line, tap it
4) watch the NY Times page with the open letter open in the webbrowser app

Revision history for this message
Alexander Sack (asac) wrote :

when was the last image where this worked?

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

Dave, can you elaborate on what you mean by "non direct links"?

Revision history for this message
Dave Morley (davmor2) wrote :

Oliver:

If you look at a omg!ubuntu post on google plus. You will see if says "Ubuntu To Create New File Manager For Unity 8 Desktop" not http://www.omgubuntu.co.uk/2014/02/ubuntu-create...... You can click on the Ubuntu To Create all day long nothing happens.

Revision history for this message
Dave Morley (davmor2) wrote :

Alexander:
It worked for sure on Tuesday when I came down to the office. Wednesday I would of used it too. So 151 was working.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

reproduced on image 153. Already in promoted one.

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

I can reproduce both on a phone and on the desktop (need to change the UA string to include the "Mobile" token).
Looks like the combination of the google plus HTML5 version + our UA string makes it impossible to click those links (that should be opening in a separate tab).

Changed in webbrowser-app:
status: New → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

The google plus HTML5 application installs a custom onclick handler for this kind of links, which does this:

    function onclick(event) {
        navIfNotButton(event, '\/app\/basic\/stream\/z13wiz1hgyejzbfm422yehzicpicjf3w204?cbp\x3d1s0i1p8k5a3o4\x26sview\x3d27\x26cid\x3d5\x26soc-app\x3d115\x26soc-platform\x3d1\x26spath\x3d\/app\/basic\/%2Bomgubuntu\/posts\x26sparm\x3dcbp%3Dy9lgk6woanfp%26sview%3D28%26cid%3D5%26soc-app%3D115%26soc-platform%3D1%26spath%3D\/app\/basic\/s%26sparm%3Dsc%253Dpp%2526sq%253Domg%252Bubuntu');
    }

And the navIfNotButton function does this:

    function navIfNotButton(event, dest) {
        var n = event.toElement;
        for (var i = 0; i < 4; i++) {
            if (!n) {
                break;
            }
            if (n.nodeName == 'A' || n.nodeName == 'BUTTON') {
                return;
            }
            n = n.parentElement;
        }
        window.location.href = dest;
    }

The element being clicked is a hyperlink (nodeName == 'A'), so this navIfNotButton function just ignores the click event, for some reason that escapes me.

Bill Filler (bfiller)
Changed in webbrowser-app:
importance: Undecided → Medium
Revision history for this message
Olivier Tilloy (osomon) wrote :

It seems this now works? Feel free to re-open the bug if you’re still seeing the issue.

Changed in webbrowser-app:
status: Confirmed → 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.