Chromium Code Reviews| Index: Source/devtools/front_end/main/Main.js |
| diff --git a/Source/devtools/front_end/main/Main.js b/Source/devtools/front_end/main/Main.js |
| index c5679f348c0da0a0c342067ae510ca1f644ee02a..674b19fc52c7aad001f1d96248f8e15a71b41caa 100644 |
| --- a/Source/devtools/front_end/main/Main.js |
| +++ b/Source/devtools/front_end/main/Main.js |
| @@ -378,13 +378,17 @@ WebInspector.Main.prototype = { |
| _documentClick: function(event) |
| { |
| - var anchor = event.target.enclosingNodeOrSelfWithNodeName("a"); |
| + var target = event.deepElementFromPoint(); |
| + var anchor = target.enclosingNodeOrSelfWithNodeName("a"); |
|
aandrey
2014/10/20 13:37:14
"Uncaught TypeError: Cannot read property 'enclosi
|
| if (!anchor || !anchor.href) |
| return; |
| // Prevent the link from navigating, since we don't do any navigation by following links normally. |
| event.consume(true); |
| + if (anchor.preventFollow) |
| + return; |
| + |
| if (anchor.target === "_blank") { |
| InspectorFrontendHost.openInNewTab(anchor.href); |
| return; |
| @@ -392,7 +396,7 @@ WebInspector.Main.prototype = { |
| function followLink() |
| { |
| - if (WebInspector.isBeingEdited(event.target)) |
| + if (WebInspector.isBeingEdited(target)) |
| return; |
| if (WebInspector.openAnchorLocationRegistry.dispatch({ url: anchor.href, lineNumber: anchor.lineNumber})) |
| return; |