qinglongtian / classilla

Automatically exported from code.google.com/p/classilla
0 stars 0 forks source link

Command-click no longer opens new windows on certain anchors #203

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Regression from 9.3.0.

# Description:

The function to open link in new tab by command+click does not work for link of 
which anchor element has child other than text node.
 E.g.
command-click works for -
<a href="http://code.google.com/p/classilla/">Classilla</a> 
but not for -
<a href="http://code.google.com/p/classilla/"><span>Classilla</span></a>

# A way to reproduce:

Go to the page: http://code.google.com/p/classilla/ 
and command-click on the classilla logo image or the text next to it.
It should open the link in new tab but does nothing in Classilla 9.3.1. 

Original issue reported on code.google.com by classi...@floodgap.com on 3 Nov 2012 at 7:51

GoogleCodeExporter commented 9 years ago

Original comment by classi...@floodgap.com on 3 Nov 2012 at 7:53

GoogleCodeExporter commented 9 years ago
Reporter Hiroto Naoka has already suggested a solution:

       default:
        // bug 298892
         //linkNode = findParentNode(event.originalTarget, "a");
+        linkNode = event.originalTarget; // issue 203

This looks correct. We should make sure it does not regress M298892, however, 
because Classilla was vulnerable to this attack.

Original comment by classi...@floodgap.com on 5 Nov 2012 at 1:25

GoogleCodeExporter commented 9 years ago
Hiroto's fix is correct and there are no regressions.

Original comment by classi...@floodgap.com on 10 Nov 2012 at 6:12

GoogleCodeExporter commented 9 years ago

Original comment by classi...@floodgap.com on 6 Jan 2013 at 7:48